*
*/
-#include "internal.h"
+#include "busybox.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <time.h>
#include <unistd.h>
#include <sys/socket.h>
-#include <sys/stat.h>
#include <sys/types.h>
#include <sys/un.h>
#include <sys/param.h>
signal (SIGTERM, quit_signal);
signal (SIGQUIT, quit_signal);
signal (SIGHUP, SIG_IGN);
+ signal (SIGCHLD, SIG_IGN);
+#ifdef SIGCLD
signal (SIGCLD, SIG_IGN);
+#endif
signal (SIGALRM, domark);
alarm (MarkInterval);
/* Create the syslog file so realpath() can work. */
close (open (_PATH_LOG, O_RDWR | O_CREAT, 0644));
if (realpath (_PATH_LOG, lfile) == NULL)
- fatalError ("Could not resolv path to " _PATH_LOG ": %s\n", strerror (errno));
+ fatalError ("Could not resolve path to " _PATH_LOG ": %s\n", strerror (errno));
unlink (lfile);
continue;
}
- if (pid == 0)
+ if (pid == 0) {
serveConnection (conn);
+ close (conn);
+ exit( TRUE);
+ }
close (conn);
}
}