DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

proc_signal(D3)


proc_signal -- send a signal to a process

Synopsis

   #include <sys/signal.h>
   #include <sys/ddi.h>
   

int proc_signal(void *pref, int sig);

Description

The proc_signal function can be used to post a signal to the process represented by pref. This will interrupt any process blocked in SV_WAIT_SIG(D3) or SLEEP_LOCK_SIG(D3) at the time the signal is posted, causing those functions to return prematurely in most cases. If the process has exited then this function has no effect.

Arguments


pref
Identifier obtained by a previous call to proc_ref(D3).

sig
Signal number to be sent.

Return values

If the process still exists, 0 is returned. Otherwise, -1 is returned to indicate that the process no longer exists.

Usage

Valid signal numbers are listed in signals(D5).

STREAMS drivers and modules should not use this mechanism for signaling processes. Instead, they can send M_SIG(D7str) or M_PCSIG(D7str) STREAMS messages to the stream head.

proc_signal( ) must not be used to send SIGTSTP to a process.

Context and synchronization

Non-blockable, interrupt, user, or blockable context.

Hardware applicability

All

Version applicability

ddi: 3, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

SCO OpenServer ODDI compatibility

SCO OpenServer ODDI does not support an equivalent function. The signal(D3oddi) function is used to send a signal to a process group; all processes in that group that are blocked by a sleep(D3oddi) call at a priority greater than PZERO.

References

proc_ref(D3), proc_unref(D3), proc_valid(D3), signals(D5)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005