- int fd;
-
- /* Test if we can open /dev/null for reading and writing. If not
- * we are most probably chrooted already and the server has been
- * restarted. So we simply don't try to redirect stdXXX ... */
- fd = open( "/dev/null", O_RDWR );
- if ( fd < 0 ) {
- Log(LOG_WARNING, "Could not open /dev/null: %s", strerror(errno));