static struct timed_event *cleanup_te;
struct server_id child_id;
+ child_id = procid_self(); /* Just initialize pid and potentially vnn */
+ child_id.pid = pid;
+
+ for (child = children; child != NULL; child = child->next) {
+ if (child->pid == pid) {
+ struct child_pid *tmp = child;
+ DLIST_REMOVE(children, child);
+ SAFE_FREE(tmp);
+ num_children -= 1;
+ break;
+ }
+ }
+
+ if (child == NULL) {
+ /* not all forked child processes are added to the children list */
+ DEBUG(2, ("Could not find child %d -- ignoring\n", (int)pid));
+ return;
+ }
+
if (unclean_shutdown) {
/* a child terminated uncleanly so tickle all
processes to see if they can grab any of the
}
}
- child_id = procid_self(); /* Just initialize pid and potentially vnn */
- child_id.pid = pid;
-
if (!serverid_deregister(child_id)) {
DEBUG(1, ("Could not remove pid %d from serverid.tdb\n",
(int)pid));
}
-
- for (child = children; child != NULL; child = child->next) {
- if (child->pid == pid) {
- struct child_pid *tmp = child;
- DLIST_REMOVE(children, child);
- SAFE_FREE(tmp);
- num_children -= 1;
- return;
- }
- }
-
- /* not all forked child processes are added to the children list */
- DEBUG(1, ("Could not find child %d -- ignoring\n", (int)pid));
}
/****************************************************************************