Re: pthread_kill( )

John Haxby <[email protected]> Tue, 25 Nov 2003 19:55:30 +0000
Newsgroups gmane.linux.redhat.devel
Message-ID <[email protected]>
anil garrepally wrote:

>Hi,
>
>I am using pthread_kill() system call by including pthread.h, while compiling it is saying, pthread_kill:undefined reference. I compiled with  gcc -lpthread and gcc -pthread..still problem was not resolved..saying undefined reference...
>
>In pthread.h also it seems that this call is not defined. I am using Redhat 9.  
>
>what is the solution to this problem...how can use pthread_kill() call.
>  
>

pthread_kill() was removed, if memory serves me correctly, since killing 
a thread tends to leave a program  in a rather less than desirable state 
if the thread holds any resources at all.   It was replaced by 
phtread_cancel() which is less draconian but does have the advantage 
that it can be handled gracefully so that a thread can clean itself up 
before terminating.

jch