HomeFreeBSD

pwait: Add an option to print remaining processes

Description

pwait: Add an option to print remaining processes

  • On startup, insert all valid PIDs into a tree.
  • In our main loop, whenever a process terminates, remove its PID from the tree.
  • On exit, if the -p flag was specified, print the remaining PIDs.

MFC after: 3 days
Reviewed by: bcr, markj
Differential Revision: https://reviews.freebsd.org/D53293

(cherry picked from commit 3d73146baeb933fe955c7496572b483a9f92914c)

Details

Provenance
desAuthored on Tue, Oct 28, 11:56 AM
Reviewer
bcr
Differential Revision
D53293: pwait: Add an option to print remaining processes
Parents
rG4e06e622b107: pwait: Avoid calling getpid(2) for each proc.
Branches
Unknown
Tags
Unknown