projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66058c9
)
daemon: exit monitor process for SIG{HUP,TERM,USR1}
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 1 May 2012 20:38:43 +0000
(22:38 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 1 May 2012 20:38:43 +0000
(22:38 +0200)
It ensures that binding socket is closed in monitor process. It also
ensures that even if child process makes a failure during termination,
SIGSEGV or other, monitor process also terminates.
src/daemon.c
patch
|
blob
|
history
diff --git
a/src/daemon.c
b/src/daemon.c
index
82d1c9e
..
5d7979d
100644
(file)
--- a/
src/daemon.c
+++ b/
src/daemon.c
@@
-66,7
+66,10
@@
pid_t child_pid = 0;
static void kill_child_handler(int num)
{
if (child_pid)
+ {
kill(child_pid, num);
+ _exit(0);
+ }
}
static void keepalive(void (*work)(void *data), void *data)