diff options
author | Gerrit Pape <pape@smarden.org> | 2002-09-25 10:17:37 +0000 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2002-09-25 10:17:37 +0000 |
commit | 3467ac501986b1afb28e69352c4368637aba67d6 (patch) | |
tree | f0d6fe1f254532ac2e18d65b76398cc22e3c2a17 /src/runsv.c | |
parent | fd1fe978b85aab7531bde8a784630626cc17cfe2 (diff) | |
download | runit-3467ac501986b1afb28e69352c4368637aba67d6.tar.gz runit-3467ac501986b1afb28e69352c4368637aba67d6.tar.xz runit-3467ac501986b1afb28e69352c4368637aba67d6.zip |
* man/runsv.8, man/runsvdir.8: new.
* utmpset.c: setlock utmp and wtmp file. 0.5.4.
Diffstat (limited to 'src/runsv.c')
-rw-r--r-- | src/runsv.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/runsv.c b/src/runsv.c index efb7968..4dbdb7f 100644 --- a/src/runsv.c +++ b/src/runsv.c @@ -92,12 +92,12 @@ void update_status(struct svdir *s) { char spid[FMT_ULONG]; if (s->islog) { - if ((fd =open_trunc("log/supervise/state")) == -1) - fatal("unable to open log/supervise/state"); + if ((fd =open_trunc("log/supervise/stat")) == -1) + fatal("unable to open log/supervise/stat"); } else { - if ((fd =open_trunc("supervise/state")) == -1) - fatal("unable to open supervise/state"); + if ((fd =open_trunc("supervise/stat")) == -1) + fatal("unable to open supervise/stat"); } buffer_init(&b, buffer_unixwrite, fd, bspace, sizeof bspace); spid[fmt_ulong(spid, (unsigned long)s->pid)] =0; @@ -113,7 +113,7 @@ void update_status(struct svdir *s) { break; } if (s->pid) { - buffer_puts(&b, " pid ("); + buffer_puts(&b, " (pid "); buffer_puts(&b, spid); buffer_puts(&b, ")"); } @@ -282,6 +282,12 @@ int ctrl(struct svdir *s, char c) { case 'i': /* sig int */ if (s->pid) kill(s->pid, SIGINT); break; + case '1': /* sig usr1 */ + if (s->pid) kill(s->pid, SIGUSR1); + break; + case '2': /* sig usr2 */ + if (s->pid) kill(s->pid, SIGUSR2); + break; } return(1); } |