Mercurial > masqmail
comparison src/child.c @ 71:98cda87105a7
removed dead code (a SIGCHLD handler)
this code probably had a bug anyway:
the handler inserts itself for a different signal again
author | meillo@marmaro.de |
---|---|
date | Wed, 16 Jun 2010 10:14:50 +0200 |
parents | 26e34ae9a3e3 |
children | fc1c6425c024 |
comparison
equal
deleted
inserted
replaced
70:805559d95d0c | 71:98cda87105a7 |
---|---|
25 #include <syslog.h> | 25 #include <syslog.h> |
26 #include <string.h> | 26 #include <string.h> |
27 | 27 |
28 #include "masqmail.h" | 28 #include "masqmail.h" |
29 | 29 |
30 int volatile sigchild_seen = 0; | |
31 | |
32 static void | |
33 sigchild_handler(int sig) | |
34 { | |
35 sigchild_seen = 1; | |
36 signal(SIGHUP, sigchild_handler); | |
37 } | |
38 | 30 |
39 int | 31 int |
40 child(const char *command) | 32 child(const char *command) |
41 { | 33 { |
42 int pipe[2]; | 34 int pipe[2]; |
43 | 35 |
44 if (socketpair(AF_UNIX, SOCK_STREAM, 0, pipe) == 0) { | 36 if (socketpair(AF_UNIX, SOCK_STREAM, 0, pipe) == 0) { |
45 pid_t pid; | 37 pid_t pid; |
46 | |
47 /* | |
48 sigchild_seen = 0; | |
49 signal(SIGCHLD, sigchild_handler); | |
50 */ | |
51 | 38 |
52 pid = fork(); | 39 pid = fork(); |
53 if (pid == 0) { | 40 if (pid == 0) { |
54 int i, max_fd = sysconf(_SC_OPEN_MAX); | 41 int i, max_fd = sysconf(_SC_OPEN_MAX); |
55 /* child */ | 42 /* child */ |