localtime() problem.

2001-04-02 Thread Liu, Guangsheng
Hi, I got the following problem with localtime() when I create 10 thread. The main problem is also attached. However, if I create 2 or 3 thread, it works fine. Any clue. Thanks. Program received signal SIGSEGV, Segmentation fault. 0x40953709 in chunk_alloc (ar_ptr=0x409e8d60, nb=24) at m

RE: localtime() problem.

2001-04-02 Thread Liu, Guangsheng
() problem. On Mon, Apr 02, 2001 at 12:52:34PM -0400, Liu, Guangsheng wrote: > I got the following problem with localtime() when I create 10 > thread. Use localtime_r if you want to use threads. It's from POSIX.1c. Tim. */ ___ Redhat-devel-l

getpid() problem

2001-04-02 Thread Liu, Guangsheng
Hi, I have one process creating several threads, inside each thread, I made getpid() call, it should display the same process id, but I got different number. Why? Thanks. void main(int argc, char *argv[]) { for (i=0; ihttps://listman.redhat.com/mailman/listi

Is STL multi-thread safe?

2001-04-05 Thread Liu, Guangsheng
Hi, I have a problem with . When I create more than 20 thread, map.find() starts to return end() which it should not. I am wondering the whole STL distributed by Red Hat multi_thread safe. If it is not, what is the alternative? The following is info about OS and compiler (I have not installe

RE: Is STL multi-thread safe?

2001-04-09 Thread Liu, Guangsheng
7;ve got 20+ threads, the rw locks might be worth the aditional effort, but then again, it would really depend on you access patterns. Do you have Unix Network Programming Vol 1, by W. Richard Stevens? It's a great reference for exactly what you seem to be doing. Hope this helps, Don "Liu,

How can I get all the process ID # that are current running in C?

2001-04-11 Thread Liu, Guangsheng
Hi, What C function can I use to get all the process ID numbers that are current running in Linux? Thanks. ___ Redhat-devel-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-devel-list

malloc() problem with thread?

2001-04-12 Thread Liu, Guangsheng
Hi, I have a problem with malloc() with thread. When my process creates more than certain number of threads, I got the following error message. Actually, it doesn't point to anywhere in my program. Moreover, I even don't use malloc() at all in my program. Is these related with library issu