Perl Programming Documentation
Download Perl
Explore

Manual

- Overview
- Tutorials
- FAQs
- History / Changes
- License

Reference

- Language
- Functions
- Operators
- Special Variables
- Pragmas
- Utilities
- Internals
- Platform Specific

Modules

- A • B • C • D • E
- F • G • H • I • L
- M • N • O • P • S
- T • U • X

Tools

- Preferences

# wait

Perl 5 version 16.0 documentation
Go to top
Show recent pages
Recently read

# wait

Perl functions A-Z | Perl functions by category | The 'perlfunc' manpage

- 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 for the child created by qx() or system(). See perlipc for details.

  Portability issues: wait in perlport.