Simplify shutdown process
authorrenato <renato@openbsd.org>
Mon, 8 Aug 2016 21:38:42 +0000 (21:38 +0000)
committerrenato <renato@openbsd.org>
Mon, 8 Aug 2016 21:38:42 +0000 (21:38 +0000)
commita80b52f6dbad5fd928c4ec3178307f6a16c9b0c3
tree14a9508a7a8cd446b0a917be962d5eb7309f5c64
parent0bf51c1ef61c78ea847cef82ae86bab1d5d8d5bc
Simplify shutdown process

On shutdown, there's no need to use kill(2) to kill the child
processes. Just closing the IPC sockets will make the children receive
an EOF, break out from the event loop and then exit.

This "pipe teardown" removes a PID reuse race condition, makes the code
simpler and allow us to remove "proc" from pledge.

OK and tweaks from claudio@
usr.sbin/eigrpd/eigrpd.c
usr.sbin/eigrpd/eigrpd.h