2.11BSD/man/cat2/sigwait.0




SIGACTION(2)	    UNIX Programmer's Manual	     SIGACTION(2)



NAME
     sigwait - wait for a signal

SYNOPSIS
     #include <signal.h>

     int sigwait(set, sig)
     _s_i_g_s_e_t__t *_s_e_t;
     _i_n_t *_s_i_g;

DESCRIPTION
     Sigwait checks for a pending signal in _s_e_t, clears it from
     the set of pending signals and returns the signal number in
     the location referenced by _s_i_g.  If more than one of the
     signals contained in _s_e_t is pending then sigwait selects
     only one and acts upon it.  If no signal contained in _s_e_t is
     pending, then sigwait waits for a signal to arrive.  All of
     the signals contained in _s_e_t should be blocked or unpredict-
     able results may occur.

RETURN VALUES
     The sigwait function returns 0 if successful and the signal
     number is stored in the location referenced by _s_i_g.

ERRORS
     The sigwait function may return one of the following errors:

     EINVAL		 The _s_e_t argument contains an invalid or
			 unsupported signal number.

     EFAULT		 _S_i_g points to memory that is not a valid
			 part of the process address space.

SEE ALSO
     sigprocmask(2)

STANDARDS
     The sigwait function call conforms to IEEE Std1003.1-1998
     (``POSIX'').
















Printed 11/26/99       September 10, 1999			1