-/*
- * print_startup - print startup information
- */
-static void
-print_startup(int pid)
-{
- inotice("now running in %s mode from %s as pid %d ...",
- !server_state_foreground ? "background" : "foreground",
- ConfigFileEntry.dpath, pid);
-
-#ifndef _WIN32
- int fd = open("/dev/null", O_RDWR);
-
- if (fd == -1) {
- perror("open /dev/null");
- exit(EXIT_FAILURE);
- }
-
- (void) dup2(fd, 0);
- (void) dup2(fd, 1);
- (void) dup2(fd, 2);
- (void) close(fd);
-
- /* let the parent process know the initialization was successful
- * -- jilles */
- if (!server_state_foreground)
- {
- /* GCC complains on Linux if we don't check the value of write pedantically.
- * Technically you're supposed to check the value, yes, but it probably can't fail.
- * No, casting to void is of no use to shut the warning up. You HAVE to use the value.
- * --Elizfaox
- */
- if(write(pip[0], ".", 1) < 1)
- abort();
-
- (void) close(pip[0]);
- }
-#endif
-}
-