CARVIEW |
- #wait
-
Behaves like wait(2) on your system: it waits for a child process to terminate and returns the pid of the deceased process, or
-1
if there are no child processes. The status is returned in$?
and${^CHILD_ERROR_NATIVE}
. Note that a return value of-1
could mean that child processes are being automatically reaped, as described in perlipc.If you use
wait
in your handler for$SIG{CHLD}
, it may accidentally wait for the child created byqx
orsystem
. See perlipc for details.Equivalent to
waitpid(-1, 0)
.Portability issues: "wait" in perlport.
Perldoc Browser is maintained by Dan Book (DBOOK). Please contact him via the GitHub issue tracker or email regarding any issues with the site itself, search, or rendering of documentation.
The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the Perl issue tracker, the mailing list, or IRC to report any issues with the contents or format of the documentation.