projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7626e49
)
Move signal setting into service_loop()
author
H. Peter Anvin
<hpa@smyrno.hos.anvin.org>
Fri, 30 Sep 2005 18:01:57 +0000
(11:01 -0700)
committer
H. Peter Anvin
<hpa@smyrno.hos.anvin.org>
Fri, 30 Sep 2005 18:01:57 +0000
(11:01 -0700)
daemon.c
patch
|
blob
|
history
diff --git
a/daemon.c
b/daemon.c
index fc5e1c3037dd3bba0367e373accf946dae0fddb4..f285a8c98ca9fbfc421b735f76f9d9f2248bd749 100644
(file)
--- a/
daemon.c
+++ b/
daemon.c
@@
-480,6
+480,8
@@
static int service_loop(int socknum, int *socklist)
pfd[i].fd = socklist[i];
pfd[i].events = POLLIN;
}
+
+ signal(SIGCHLD, child_handler);
for (;;) {
int i;
@@
-518,8
+520,6
@@
static int serve(int port)
{
int socknum, *socklist;
- signal(SIGCHLD, child_handler);
-
socknum = socksetup(port, &socklist);
if (socknum == 0)
die("unable to allocate any listen sockets on port %u", port);