implement waitForProcess using signals
waitForProcess
currently calls waitpid
with a safe FFI call, which means that
- you need to use
-threaded
to call this in a multithreaded program - one OS thread is needed per
waitProcess
instead we could implement this using the IO manager: have waitForProcess
communicate with the IO manager, which wakes up the client when the appropriate SIGCHLD
is received. Note that this means hooking SIGCHLD
so we'd interact badly if the program itself wanted to use SIGCHLD
.
I think it was Duncan Coutts who mentioned this idea to me.
Trac metadata
Trac field | Value |
---|---|
Version | 6.8.2 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/process |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown |
Architecture | Unknown |