next node: WaitConv,
prev node: SignalConv,
up to node: Subsystem Unix


Wait

Signature of Wait

List of Import References :
See BOOL
See Char
See Com
See DENOTATION
See Denotation
See FileSystem
See Nat
See Option
See Pair
See ProcessCtrl
See Quadruple
See Real
See Seq
See Set
See Signal
See String
See Time
See UserAndGroup
See Void

SIGNATURE Wait

$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)

-- waiting for child processes

IMPORT
  Pair[process,childstat]
                      ONLY pair: SORT
  Option[pair[process,childstat]]
                      ONLY option: SORT
  Com[pair[process,childstat]]
                      ONLY com: SORT
  Com[option[pair[process,childstat]]]
                      ONLY com: SORT
  ProcessCtrl         ONLY process: SORT procstat: SORT
  Signal              ONLY signal: SORT

TYPE childstat == exited   (status: procstat)
                  -- child process terminated normally
                  signalled(signal: signal)
                  -- child process terminated due to a POSIX signal
                  signalledUnknown
                  -- child process terminated due to some non-POSIX signal
                  stopped  (signal: signal)
                  -- child process was stopped due to a POSIX signal
                  stoppedUnknown
                  -- child process was stopped due to some non-POSIX signal

FUN wait    : com[pair[process,childstat]]
              -- wait for any child
    wait    : com[option[pair[process,childstat]]]
              -- as above, but non-blocking
    wait    : process -> com[pair[process,childstat]]
              -- wait for specific process
    wait    : process -> com[option[pair[process,childstat]]]
              -- as above, but non-blocking
    waitGrp : com[pair[process,childstat]]
              -- wait for any child in this process group
    waitGrp : com[option[pair[process,childstat]]]
              -- as above, but non-blocking
    waitGrp : process -> com[pair[process,childstat]]
              -- wait for any child in the specified process group
    waitGrp : process -> com[option[pair[process,childstat]]]
              -- as above, but non-blocking
    -- see POSIX waitpid()
    -- NOTE that the status of stopped children will always be reported.
    -- NOTE that process groups have the same representation as processes.
    --      Such is the nature of operating systems.


next node: WaitConv,
prev node: SignalConv,
up to node: Subsystem Unix