2024-01-23 08:26:57 +01:00
|
|
|
# waitpid
|
|
|
|
|
|
|
|
> Wait for the termination of arbitrary processes.
|
|
|
|
> See also: `wait`.
|
|
|
|
> More information: <https://manned.org/waitpid.1>.
|
|
|
|
|
|
|
|
- Sleep until all processes whose PIDs have been specified have exited:
|
|
|
|
|
|
|
|
`waitpid {{pid1 pid2 ...}}`
|
|
|
|
|
|
|
|
- Sleep for at most `n` seconds:
|
|
|
|
|
2025-03-28 16:06:49 +02:00
|
|
|
`waitpid {{[-t|--timeout]}} {{n}} {{pid1 pid2 ...}}`
|
2024-01-23 08:26:57 +01:00
|
|
|
|
|
|
|
- Do not error if specified PIDs have already exited:
|
|
|
|
|
2025-03-28 16:06:49 +02:00
|
|
|
`waitpid {{[-e|--exited]}} {{pid1 pid2 ...}}`
|
2024-01-23 08:26:57 +01:00
|
|
|
|
|
|
|
- Sleep until `n` of the specified processes have exited:
|
|
|
|
|
2025-03-28 16:06:49 +02:00
|
|
|
`waitpid {{[-c|--count]}} {{n}} {{pid1 pid2 ...}}`
|
2024-01-23 08:26:57 +01:00
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
2025-03-28 16:06:49 +02:00
|
|
|
`waitpid {{[-h|--help]}}`
|