setpause(2) argument
Myers
rebein at dtrc.dt.navy.mil
Wed Sep 19 22:15:11 AEST 1990
In article <8540 at ncar.ucar.edu> steve at groucho.ucar.edu (Steve Emmerson) writes:
>Would someone who *knows* please tell me the type of argument expected
>by the sigpause(2) system call. Is it a signal-number or a signal-mask?
>
>Steve Emmerson steve at unidata.ucar.edu ...!ncar!unidata!steve
The following is copied directly from the UNICOS System Calls course
taught here last week by CRAY; the reference manual UNICOS System Calls
and C library Routines (TR-USC), page 10-66. Like I said, we just had
the class last week and I've not used this at all nor do I claim to
*know*. BTW, we're currently migrating to UNICOS. Hope this helps.
Cindy Myers
rebein at dtrc.dt.navy.mil
(301) 227-1271
NAME
sigpause - suspend a process until signal received
SYNOPSIS
int sigpause (sig)
int sig;
RETURN
0 -> successful
1 -> failure
Like pause, the sigpause system call will suspend a process until ANY
signal is received. Unlike pause, sigpause requires an argument sig.
The argument sig indicates that if a signal of that type has been
received by the process and is being held, it will be released and the
appropriate signal action taken.
NOTE: sigpause DOES NOT cause process suspension waiting for only one
signal type (sig) but will be suspended until ANY signal type is
received.
According to the SR-2012 manual, sigpause has a special application.
It states that sigpause is useful for testing variables that are
changed on the occurrence of a signal. The correct usage is to use
sighold to block a signal first, then test the variables. If they have
not changed, call the sigpause system call to wait for the signal.
More information about the Comp.unix.cray
mailing list