# waitpid - utility to wait for arbitrary processes - man(1) - [phpMan]

> **TLDR:** Wait for the termination of arbitrary processes.
>
- Sleep until all processes whose PIDs have been specified have exited:
  `waitpid {{process_id1 process_id2 ...}}`
- Sleep for at most `n` seconds:
  `waitpid {{-t|--timeout}} {{n}} {{process_id1 process_id2 ...}}`
- Do not error if specified PIDs have already exited:
  `waitpid {{-e|--exited}} {{process_id1 process_id2 ...}}`
- Sleep until `n` of the specified processes have exited:
  `waitpid {{-c|--count}} {{n}} {{process_id1 process_id2 ...}}`
- Display help:
  `waitpid {{-h|--help}}`

*Source: tldr-pages*

---

[_WAITPID_(1)](https://www.chedong.com/phpMan.php/man/WAITPID/1/markdown)                                  User Commands                                 [_WAITPID_(1)](https://www.chedong.com/phpMan.php/man/WAITPID/1/markdown)

## NAME
       waitpid - utility to wait for arbitrary processes

## SYNOPSIS
       **waitpid **[-v] [**--timeout**|**-t _**seconds_] pid...

## DESCRIPTION
       **waitpid **is a simple command to wait for arbitrary non-child processes.

       It exits after all processes whose PIDs have been passed as arguments have exited.

## OPTIONS
### -v --verbose
           Be more verbose.

### -t --timeout _
           Maximum wait time.

### -e --exited
           Don’t error on already exited PIDs.

### -c --count _
           Number of process exits to wait for.

### -h --help
           Display help text and exit.

### -V --version
           Print version and exit.

## EXIT STATUS
       **waitpid **has the following exit status values:

       **0**
           success

       **1**
           unspecified failure

       **2**
           system does not provide necessary functionality

       **3**
           timeout expired

## AUTHORS
       Thomas Weißschuh <<thomas@t-8ch.de>>

## SEE ALSO
       [**waitpid**(2)](https://www.chedong.com/phpMan.php/man/waitpid/2/markdown) [**wait**(1P)](https://www.chedong.com/phpMan.php/man/wait/1P/markdown)

## REPORTING BUGS
       For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.

## AVAILABILITY
       The **waitpid **command is part of the util-linux package which can be downloaded from Linux
       Kernel Archive <<https://www.kernel.org/pub/linux/utils/util-linux/>>.

util-linux 2.39.3                            2023-11-21                                   [_WAITPID_(1)](https://www.chedong.com/phpMan.php/man/WAITPID/1/markdown)
