[729] in Pthreads mailing list archive
About signal handler per pthread
daemon@ATHENA.MIT.EDU (Zhenhai Duan)
Fri Oct 17 19:41:16 1997
Date: Fri, 17 Oct 1997 18:29:12 -0500 (CDT)
From: Zhenhai Duan <duan@cs.umn.edu>
To: pthreads@MIT.EDU
Cc: proven@MIT.EDU
Hello,
I am a new user of the pthread(POSIX thread), and I do not
know that how let each thread handle signal seperately, Maybe
the following example can make it more clearly.
A, B ,and C are three pthread of one process,
A send SIGUSR1 to B, and C,
In B:
BHandler() is function to handle SIGUSR1;
sigaction(....);
In C:
CHandler() is function to handle SIGUSR1;
sigaction(...);
in C:
pthread_kill(Bpthread, SIGUSR1);
pthread_kill(Cpthread, SIGUSR1);
But it seems that only B or C can handle SIGUSR1.
Please give some information. Thank you!
--Zhenhai
--------------------------------------------------------------
Department of Computer Science duan@cs.umn.edu
University of Minnesota http://www.cs.umn.edu/~duan/
Tel. 612-6267526(Office)
--------------------------------------------------------------