Commit Graph

4 Commits

Author SHA1 Message Date
Bryan Drewery
b06b52baac pwait: Add a -t flag to specify a timeout before exiting, and tests.
The exit status will be 124, as the timeout(1) utility uses.

Reviewed by:	jilles
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D9697
2017-03-07 22:16:55 +00:00
Xin LI
f3de285bbf Use a different way to silence clang analyzer as done in r245494 by
explicitly telling the compiler that we are on the exit route.

X-MFC:	together with r245494
2013-01-16 18:15:25 +00:00
Eitan Adler
28e4657584 Free memory before exiting in order to silence a warning from the clang
static analyzer

Approved by:	cperciva
MFC after: 	3 days
2013-01-16 05:03:52 +00:00
Jilles Tjoelker
0e5e416780 Add pwait utility, which waits for any process to terminate.
This is similar to the Solaris utility of the same name.

Some use cases:
* rc.subr's wait_for_pids
* interactive use, e.g. to shut down the computer when some task is done
  even if the task is already running

Discussed on:	hackers@
2009-11-17 22:47:20 +00:00