changeset: 8:acec1806580b
tag: tip
user: Anselm R Garbe <anselm_AT_garbe.us>
date: Sun Aug 16 13:33:02 2009 +0100
files: quark.c
description:
moved signal handlers before port binding
diff -r bd2c03e84524 -r acec1806580b quark.c
--- a/quark.c Sun Aug 16 11:51:14 2009 +0100
+++ b/quark.c Sun Aug 16 13:33:02 2009 +0100
@@ -383,6 +383,14 @@
if(!(gpwd = getpwnam(group)))
die("error: invalid group %s\n", group);
+ signal(SIGCHLD, sighandler);
+ signal(SIGHUP, sighandler);
+ signal(SIGINT, sighandler);
+ signal(SIGQUIT, sighandler);
+ signal(SIGABRT, sighandler);
+ signal(SIGTERM, sighandler);
+ signal(SIGKILL, sighandler);
+
/* init */
setbuf(stdout, NULL); /* unbuffered stdout */
memset(&hints, 0, sizeof hints);
@@ -416,14 +424,6 @@
die("error: location too long\n");
}
- signal(SIGCHLD, sighandler);
- signal(SIGHUP, sighandler);
- signal(SIGINT, sighandler);
- signal(SIGQUIT, sighandler);
- signal(SIGABRT, sighandler);
- signal(SIGTERM, sighandler);
- signal(SIGKILL, sighandler);
-
if(chroot(docroot) == -1)
die("error: chroot %s: %s\n", docroot, strerror(errno));
Received on Sun Aug 16 2009 - 12:33:31 UTC
This archive was generated by hypermail 2.2.0 : Sun Aug 16 2009 - 14:20:23 UTC