Fix daemon bug when run with stdin/stdout/stderr closed
Fix daemon bug when run with stdin/stdout/stderr closed

If daemon is run with stdin, stdout or stderr closed, the pidfile is
opened on one of these file descriptors. It is then incorrectly closed
when daemon redirects them to /dev/null or the system log. To avoid
this, unconditionally redirect stdin (which we never use) from /dev/null
at startup, and redirect stdout and stderr to /dev/null too if not open.

arachsys/init,arachsys/init