*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/sigsuspend (2)              
Title
Content
Arch
Section
 

Contents


SIGSUSPEND(2)							 SIGSUSPEND(2)


NAME    [Toc]    [Back]

     sigsuspend	- atomically release blocked signals and wait for interrupt
     (POSIX)

SYNOPSIS    [Toc]    [Back]

     int sigsuspend(const sigset_t *maskptr);

DESCRIPTION    [Toc]    [Back]

     sigsuspend	replaces the current thread's set of masked signals with the
     set pointed to by maskptr and then	suspends the thread until delivery of
     a signal whose action is either to	execute	a signal-catching function or
     to	terminate the process.

     If	the action is to terminate the process then sigsuspend will never
     return.  If the action is to execute a signal-catching function, then
     sigsuspend	will return after the signal-catching functions	returns, with
     the signal	mask restored to the set that existed prior to the sigsuspend
     call.

     In	normal usage, a	signal is blocked via sigprocmask(2) to	begin a
     critical section, variables modified on the occurrence of the signal are
     examined to determine that	there is no work to be done, and the thread
     pauses by calling sigsuspend with the mask	returned by sigprocmask.  It
     is	not possible to	block signals that cannot be ignored.  This is
     enforced by the system without causing an error to	be indicated.

     Routines described	in sigsetops(3)	are used to create and manipulate the
     input-parameter signal masks submitted to sigaction(2), sigprocmask(2),
     and sigsuspend(2),	and returned by	sigpending(2).	These masks are	of
     type sigset_t.

NOTES    [Toc]    [Back]

     POSIX specifies (contrary to BSD and System V) that a thread may block
     SIGCONT.  However,	a) SIGCONT always restarts the receiving process
     (unless it	is waiting for an event	such as	I/O), and b) if	the receiving
     process has installed a handler for SIGCONT and blocked the signal, the
     process will NOT enter its	handler	until it unblocks SIGCONT.  (The
     signal will remain	pending.)  Therefore, if sigsuspend is called with a
     mask which	blocks SIGCONT,	receipt	of that	signal will set	the process
     running, but not cause it to enter	a handler.

RETURN VALUE    [Toc]    [Back]

     Since sigsuspend suspends process execution indefinitely, there is	no
     successful	completion return value.  If a return occurs, -1 is returned
     and errno is set to indicate the error.

ERRORS    [Toc]    [Back]

     The sigsuspend function will fail if:

     [EINTR]		 A signal is caught by the calling thread and control
			 is returned from the signal-catching function.




									Page 1






SIGSUSPEND(2)							 SIGSUSPEND(2)



     [EFAULT]		 maskptr points	to memory that is not a	part of
			 process's valid address space.

SEE ALSO    [Toc]    [Back]

      
      
     sigaction(2), sigpending(2), sigprocmask(2), sigsetops(3).

WARNING    [Toc]    [Back]

     The POSIX and System V signal facilities have different semantics.	 Using
     both facilities in	the same program is strongly discouraged and will
     result in unpredictable behavior.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
sigsuspend NetBSD atomically release blocked signals and wait for interrupt
sigpause OpenBSD atomically release blocked signals and wait for interrupt
sigsuspend OpenBSD atomically release blocked signals and wait for interrupt
sigpause Linux atomically release blocked signals and wait for interrupt
sigpause NetBSD atomically release blocked signals and wait for interrupt
sigpause FreeBSD atomically release blocked signals and wait for interrupt
sigsuspend FreeBSD atomically release blocked signals and wait for interrupt
sigpause IRIX atomically release blocked signals and wait for interrupt (4.3BSD)
sigsuspend Tru64 Atomically change the set of blocked signals and wait for a signal
sigprocmask IRIX alter and return previous state of the set of blocked signals (POSIX)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service