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 Functionsthr_kill(3THR)


NAME

 thr_kill - send a signal to a thread

SYNOPSIS

 
cc -mt [ flag... ] file...[ library... ]

#include <signal.h> 
#include <thread.h> 
int thr_kill(thread_t thread, int sig);

DESCRIPTION

 

thr_kill() sends the sig signal to the thread designated by thread. thread must be a member of the same process as the calling thread. sig must be one of the signals listed in signal(3HEAD); with the exception of SIGLWP, SIGCANCEL, and SIGWAITING being reserved and off limits to thr_kill(). If sig is 0, a validity check is done for the existence of the target thread; no signal is sent.

RETURN VALUES

 

Upon successful completion, thr_kill() returns 0. Otherwise, an error number is returned. In the event of failure, no signal is sent.

ERRORS

 
ESRCH
No thread was found that corresponded to the thread designated by thread ID.
EINVAL
The sig argument value is not zero and is an invalid or an unsupported signal number.

ATTRIBUTES

 

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

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

kill(2), sigaction(2), raise(3C), thr_self(3THR), attributes(5), signal(3HEAD), 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.