Replace popen/setjmp/pclose with a manual pipe/fork/exec/wait.
authorcheloha <cheloha@openbsd.org>
Sat, 24 Feb 2018 20:00:07 +0000 (20:00 +0000)
committercheloha <cheloha@openbsd.org>
Sat, 24 Feb 2018 20:00:07 +0000 (20:00 +0000)
commitfde1d200342a9eb4e2358c62c38e0daa9ac08c6e
tree1a17ae795c29603bfbbb0fd03a80bae5fa0cec75
parent81636af24115c47360868ec28d52068877500921
Replace popen/setjmp/pclose with a manual pipe/fork/exec/wait.

We can limit the time we wait on wall(1) without the complexity
inherent to setjmp.

Actually wait (instead of waitpid) to pick up any straggler wall
processes from prior timewarn() calls.

With a tweak from millert@ to ensure we don't accidentally close
stdin before we exec wall.

ok millert@ tb@
sbin/shutdown/shutdown.c