Changeset 34085 in project


Ignore:
Timestamp:
05/23/17 21:02:57 (4 weeks ago)
Author:
sjamaan
Message:

scsh-process: Add 0.8 with nonblocking "wait" procedure by Jörg Wittenberger

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/scsh-process

    r33832 r34085  
    286286<procedure>(wait [pid-or-process [nohang]])</procedure>
    287287
    288 Like {{process-wait}}: Suspends the current process until the child
    289 process described by {{pid-or-process}} (either a numerical process ID
    290 or a scsh-process object) has terminated using the UNIX system call
    291 waitpid(). If {{pid-or-process}} is not given, then this procedure
    292 waits for any child process. If {{nohang}} is given and not {{#f}}
    293 then the current process is not suspended.
     288Like {{process-wait}}, but nonblocking: Suspends the current process
     289until the child process described by {{pid-or-process}} (either a
     290numerical process ID or a scsh-process object) has terminated using
     291the UNIX system call waitpid(). If {{pid-or-process}} is not given,
     292then this procedure waits for any child process. If {{nohang}} is
     293given and not {{#f}} then the current process is not suspended.
    294294
    295295This procedure returns three values, '''in a different order from
     
    307307waited for once after they have completed and will cause an error
    308308otherwise.
     309
     310Since version 0.8 of scsh-process, this procedure is nonblocking,
     311which means you can {{wait}} for a child in a thread and have the
     312other threads continue to run; the process isn't suspended, but a
     313signal handler will take care of unblocking the waiting thread.
     314
    309315
    310316<procedure>(signal-process proc signal)</procedure>
     
    408414=== Changelog
    409415
     416* 0.8 - Add support for waiting for children from threads without blocking the entire process (thanks to Jörg F. Wittenberger).
    410417* 0.7.1 - Fix version number in {{.setup}} file (thanks to Jörg F. Wittenberger).
    411418* 0.7 - Actually export {{pid:proc}}.  Clear pending child process table on fork (thanks to Jörg F. Wittenberger).
Note: See TracChangeset for help on using the changeset viewer.