Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Threads Library Functionspthread_kill(3THR)


NAME

 pthread_kill - send a signal to a thread

SYNOPSIS

 
cc -mt [ flag... ] file... -lpthread [ -lrt library... ]
#include <signal.h> 
#include <pthread.h>
int pthread_kill(pthread_t thread, int sig);

DESCRIPTION

 

The pthread_kill() function is used to request that a signal be delivered to the specified thread.

As in kill(), if sig is 0, error checking is performed but no signal is actually sent.

RETURN VALUES

 

Upon successful completion, the function returns a value of 0. Otherwise the function returns an error number. If the pthread_kill() function fails, no signal is sent.

ERRORS

 

The pthread_kill() function will fail if:

ESRCH
No thread could be found corresponding to that specified by the given thread ID.
EINVAL
The value of the sig argument is an invalid or unsupported signal number.

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

kill(1), pthread_self(3THR), pthread_sigmask(3THR), raise(3C), attributes(5), standards(5)


SunOS 5.9Go To TopLast Changed 15 May 1998

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.