/tomo/pyhst

To get this branch, use:
bzr branch http://darksoft.org/webbzr/tomo/pyhst

« back to all changes in this revision

Viewing changes to debug.c

  • Committer: Suren A. Chilingaryan
  • Date: 2011-08-27 23:38:31 UTC
  • Revision ID: csa@dside.dyndns.org-20110827233831-uts6phfd9ubqf4on
To prevent silent segmentations during fatal errors executed within multithreaded context, as a temporal solution just print error message before calling g_log

Show diffs side-by-side

added added

removed removed

Lines of Context:
279
279
    _ds_gen_message(DS_MAX_LOG_STRING, msg, file, func, line, service, module, ptr, prefix, err, format, ap);
280
280
    va_end(ap);
281
281
 
 
282
        /* This is a temporal solution due to silent segmentation failures if
 
283
        g_error (fatal errors) are executed from multithreaded context. */
 
284
    if (log_levels&DS_LOG_FATAL_MESSAGE) {
 
285
        printf("Aborting due to the fatal error: %s\n", msg);
 
286
    }
 
287
 
282
288
    //g_static_mutex_lock(g_log_mutex);
283
289
    g_log(log_domain, log_levels&DS_LOG_LEVEL_MASK, "%s", msg);
284
290
    //g_static_mutex_unlock(g_log_mutex);