4 ms·
"The third and last process control system call used by the Shell is processid, status = wait() This primitive causes its caller to suspend execution un
by kryptiskt 11y ago
"The third and last process control system call used by the Shell is
processid, status = wait()
This primitive causes its caller to suspend execution until one
of its children has completed execution. Then wait returns the
processid of the terminated process and a status value indicating
how the process died. (Processes which are never waited for die
unnoticed and presumably unmourned)."
A lost opportunity to give C multiple return values.
- luckydude 11y agoUm, structs? typedef struct { pid_t pid; int status; } wait_t; wait_t status = wait();
- sebleblanc 11y agoTuple support, which in essence are anonymous structs, would have been very nice in C, too.