Don't add console watcher if not PID 1.
authorDavin McCall <davmac@davmac.org>
Sat, 27 Jul 2019 07:03:41 +0000 (17:03 +1000)
committerDavin McCall <davmac@davmac.org>
Sat, 27 Jul 2019 12:25:02 +0000 (22:25 +1000)
commit8c6acc1371eace16aac319e0a9cdefe96f4b7537
tree391ee71b8179b431c7895fb7b2cb3f4cf17c8e84
parent2869b98b0308521ca12e08dc90b358840cdffc98
Don't add console watcher if not PID 1.

If not PID 1, we don't need to ask for console input. Adding a watcher
fails if we don't have a (suitable) stdin, eg FreeBSD shell if dinit is
run in background.
src/dinit.cc