Lines Matching refs:pid
75 pid_t pid;
119 static int waitfor(const struct init_action *a, pid_t pid);
333 pid_t pid;
343 pid = fork();
346 if (pid)
347 return pid;
372 if ((pid = fork()) < 0) {
377 if (pid > 0) {
385 waitfor(NULL, pid);
391 if ((pid = fork()) < 0) {
395 if (pid == 0) {
400 waitfor(NULL, pid);
475 "(pid %d, tty '%s')\n",
483 message(L_LOG, "starting pid %d, tty '%s': '%s'",
508 static int waitfor(const struct init_action *a, pid_t pid)
513 runpid = (NULL == a)? pid : run(a);
544 /* Only run stuff with pid==0. If they have
545 * a pid, that means it is still running */
546 if (a->pid == 0) {
547 a->pid = run(a);
557 pid_t pid;
561 pid = vfork();
562 if (pid == 0) { /* child */
566 waitpid(pid, NULL, 0);
597 /* Send signals to every process _except_ pid 1 */
873 if ((a->action & (ONCE | SYSINIT | WAIT)) && a->pid == 0) {
1020 if (a->pid == wpid) {
1021 /* Set the pid to 0 so that the process gets
1023 a->pid = 0;
1024 message(L_LOG, "process '%s' (pid %d) exited. "