Jump to content

Perl Programming/Keywords/wait

From Wikibooks, open books for an open world
Previous: vec Keywords Next: waitpid

The wait keyword

[edit | edit source]

The function wait behaves like wait(2) on UNIX-like systems, returning the PID of the child process deceased, or -1, if there was none. The status of the process can be found in $? and ${^CHILD_ERROR_NATIVE}.

Syntax

[edit | edit source]
  wait
Previous: values Keywords Next: waitpid