Lines Matching refs:pid
80 int pid;
163 /* pid */
165 fd = open_trunc_or_warn("supervise/pid.new");
168 if (s->pid) {
170 int size = sprintf(spid, "%u\n", (unsigned)s->pid);
174 if (rename_or_warn("supervise/pid.new",
175 s->islog ? "log/supervise/pid" : "log/supervise/pid"+4))
222 status.pid_le32 = SWAP_LE32(s->pid);
248 int pid;
259 pid = fork();
260 if (pid == -1) {
264 if (!pid) {
272 while (wait_pid(&w, pid) == -1) {
288 if (s->pid && !custom(s, 't')) {
289 kill(s->pid, SIGTERM);
294 kill(s->pid, SIGCONT);
299 kill(s->pid, SIGCONT);
317 if (s->pid != 0)
346 s->pid = p;
360 if (s->pid && s->state != S_FINISH)
366 if (s->pid == 0)
376 if (s->pid && s->state != S_FINISH)
380 if (s->pid && !custom(s, c))
381 kill(s->pid, SIGKILL);
385 if (s->pid && !custom(s, c))
386 kill(s->pid, SIGSTOP);
391 if (s->pid && !custom(s, c))
392 kill(s->pid, SIGCONT);
400 if (!s->pid)
424 if (s->pid && !custom(s, c))
425 kill(s->pid, sig);
453 /* bss: svd[0].pid = 0; */
458 /* bss: svd[1].pid = 0; */
555 if (!svd[1].pid && svd[1].want == W_UP)
557 if (!svd[0].pid)
586 if (child == svd[0].pid) {
587 svd[0].pid = 0;
607 if (child == svd[1].pid) {
608 svd[1].pid = 0;
632 if (svd[1].pid == 0)