Bug 3409 - RLS prints out negative thread ids
: RLS prints out negative thread ids
Status: RESOLVED FIXED
: Replica Location
RLS
: development
: PC Linux
: P3 trivial
: ---
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2005-05-24 17:03 by
Modified: 2005-06-15 18:04 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-05-24 17:03:38
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);