steve@groucho.ucar.edu (Steve Emmerson) (09/19/90)
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@unidata.ucar.edu ...!ncar!unidata!steve
rebein@dtrc.dt.navy.mil (Myers) (09/19/90)
In article <8540@ncar.ucar.edu> steve@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@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@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.