/* it's possible that the child could have already died before the
* pthread_sigmask. we need to check for this. */
- if (kill(pid, 0) < 0)
+ if (kill(pid, 0) < 0) {
+ LOG(log_error, logtype_default, "server_child_add: no such process pid [%d]", pid);
goto exit;
+ }
fork = (server_child_fork *) children->fork + forkid;
server_child_fork *fork;
struct server_child_data *child, *tmp;
int i, j;
+ pid_t pid = getpid();
for (i = 0; i < children->nforks; i++) {
fork = (server_child_fork *) children->fork + i;
child = fork->table[j]; /* start at the beginning */
while (child) {
tmp = child->next;
+
+ if (child->ipc_fds[0] != -1)
+ close(child->ipc_fds[0]);
if (child->clientid) {
free(child->clientid);
}