pthread_kill

Sends a signal to a thread.

Library:LibC
Classification:POSIX
Service:Threads

Syntax

  #include <pthread.h>
   
  int   pthread_kill (
     pthread_t   thread,
     int         sig);
  

Parameters

thread

(IN) Specifies the ID of the thread to mark for termination.

sig

(IN) Specifies the signal to send. If set to 0, error checking is performed but no signal is sent. For a list of POSIX signals supported on NetWare, see Standard Signals.

Return Values

If successful, returns 0; otherwise, returns a nonzero error code:

Decimal

Constant

Description

9

EINVAL

The sig parameter is invalid or an unsupported signal number.

77

ESRCH

The specified thread ID is invalid; it might not exist

79

ENOTSUP

The POSIX semantics linker flag (0x00400000) has not been set. For LibC to support this operation, this linker flag must be set. For more information, see FLAG ON and FLAG OFF Parameters in Volume 1.

Remarks

If pthread_kill fails, no signal is sent.

IMPORTANT:The pthread_kill function is only supported when you compile your NLM to use POSIX semantics, which is supported on NetWare 6.5 SP3 or later.

See Also