Lines Matching defs:child
97 static child_t **child = NULL;
107 /* nscd id: main, forker, or child */
123 if (child[s] == NULL)
125 free(child[s]->mutex);
126 free(child[s]->cond);
127 free(child[s]);
128 child[s] = NULL;
156 if (child[s] == NULL) {
157 child[s] = (child_t *)calloc(1, sizeof (child_t));
158 if (child[s] == NULL)
160 ch = child[s];
180 ch = child[s];
201 child = (child_t **)calloc(max_pu_nscd, sizeof (child_t *));
202 if (child == NULL)
230 ch = child[i];
262 (void) memcpy(tmp, child, sizeof (child_t) *
264 free(child);
265 child = tmp;
274 ch = child[used_slot];
276 ch = child[open_head];
301 child[open_tail]->next_open = slot;
379 if (child[i] == NULL)
382 if (child[i]->child_state >= CHILD_STATE_PIDKNOWN) {
384 (me, "killing child process %d (doorfd %d)\n",
385 child[i]->child_pid, child[i]->child_door);
387 ret = selfcred_kill(child[i]->child_door);
390 (void) kill(child[i]->child_pid, SIGTERM);
392 if (child[i]->child_state != CHILD_STATE_NONE)
393 (void) return_cslot_nolock(child[i]);
434 "killing all child processes\n", fpid);
441 /* forker exited/crashed, kill all the child processes */
484 /* wait until child exits */
489 (me, "child (pid = %d) exited or crashed ...\n", cpid);
491 /* return the slot used by the child */
616 /* child nscd can only talk to the main nscd */
632 ch = child[cslot];
658 (me, "invalid slot/child state (%d) for uid %d\n",
680 (me, "child in slot %d has door %d\n",
684 * let waiters know that the child is ready to
690 /* monitor the child nscd */
801 /* fork a child for the slot assigned by the main nscd */
825 * remember when this child nscd starts
840 (me, "child %d\n", getpid());
852 /* notify main that child is active */
882 (me, "child forked: parent pid = %d, child pid = %d\n",
982 (me, "child uid = %d, gid = %d\n", set2uid, set2gid);
985 if (child == NULL || (ch = get_cslot(set2uid, 0)) == NULL) {
988 (me, "no child slot available (child array = %p, slot = %d)\n",
989 child, ch->child_slot);
1005 /* ask forker to fork a new child */
1138 /* enable child nscd management */