Bugzilla – Bug 3409
RLS prints out negative thread ids
Last modified: 2005-06-15 18:04:34
You need to log in before you can comment on or make changes to this bug.
pthread_t is defined as of type 'unsigned long int'. RLS is logging these using '%d'. On FC2/3 machines, the thread ids are logged with negative values. '%lu' is the right format specifier. diff -r old/misc.c new/misc.c 80c80 < syslog(level, "T%d: %s", (int) pthread_self(), buf); --- > syslog(level, "T%lu: %s", (unsigned long int) pthread_self(), buf); 83c83 < globus_libc_printf("%s T%d: %s\n", tbuf, (int) pthread_self(), buf); --- > globus_libc_printf("%s T%lu: %s\n", tbuf, (unsigned long int) pthread_self(), buf); diff -r old/server.c new/server.c 3434c3434 < logit(LOG_DEBUG, "startthread: id %d num %d", thr, numthreads); --- > logit(LOG_DEBUG, "startthread: id %lu num %d", thr, numthreads);