124 |
return 0; |
return 0; |
125 |
} |
} |
126 |
|
|
127 |
static void |
void |
128 |
sig_local(int code) |
cleanup_children() |
129 |
{ |
{ |
130 |
pid_t pid; |
pid_t pid; |
131 |
int status; |
int status; |
133 |
while ((pid = waitpid(-1, &status, WNOHANG)) > 0) |
while ((pid = waitpid(-1, &status, WNOHANG)) > 0) |
134 |
info(VERBOSE, _("Local program [%lu] finished."), |
info(VERBOSE, _("Local program [%lu] finished."), |
135 |
(unsigned long) pid); |
(unsigned long) pid); |
136 |
return; |
} |
137 |
|
|
138 |
|
static RETSIGTYPE |
139 |
|
sig_local(int code) |
140 |
|
{ |
141 |
|
/* EMPTY FUNCTION */ |
142 |
|
/* Notice: This signal handler is installed only by |
143 |
|
make_local_connection, that is used to launch the local |
144 |
|
mailer. After the mailer exits, the main code will read |
145 |
|
the return code from the mailer's outgoing pipe. If |
146 |
|
waitpid() is called before this happens, the pipe will be |
147 |
|
broken and the read will fail. Therefore, do not call waitpid() |
148 |
|
from the handler. This should be done after smtp_session() |
149 |
|
by calling cleanup_children() */ |
150 |
} |
} |
151 |
|
|
152 |
int |
int |