diff options
author | Gerrit Pape <pape@smarden.org> | 2003-04-24 11:12:46 +0000 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2003-04-24 11:12:46 +0000 |
commit | 6877501dc293237dd3dee39efd136b7beefc68dc (patch) | |
tree | fe9e92c26fd33387efeebb38d56b85fe03b45841 /src/svwaitup.c | |
parent | a5a6633009576cbfe00304e15f3f3ce243adf0eb (diff) | |
download | runit-6877501dc293237dd3dee39efd136b7beefc68dc.tar.gz runit-6877501dc293237dd3dee39efd136b7beefc68dc.tar.xz runit-6877501dc293237dd3dee39efd136b7beefc68dc.zip |
* runsvdir.c: don't propagate sig_term to runsv processes when receiving
sig_term; send sig_term to all runsv processes and exit 111 when receiving sig_hangup. * svlogd.c: code cleanup. * svwaitdown.c: send command "d" (and "x" if -x is set) to a service if it's not in state 'want down'. * svwaitup.c: minor code cleanup. * man/runsvdir.8, man/svwaitdown.8: adapt. 0.9.0.
Diffstat (limited to 'src/svwaitup.c')
-rw-r--r-- | src/svwaitup.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/svwaitup.c b/src/svwaitup.c index 69278aa..fca4eb8 100644 --- a/src/svwaitup.c +++ b/src/svwaitup.c @@ -10,22 +10,21 @@ #define FATAL "svwaitup: fatal: " #define WARNING "svwaitup: warning: " #define INFO "svwaitup: " -#define USAGE " [ -v ] [ -s 2..600 ] service ..." +#define USAGE " [-v] [-s 2..600] service ..." const char *progname; unsigned long sec =2; unsigned int rc =0; const char * const *dir; -void usage () { strerr_die4x(1, "usage: ", progname, USAGE, "\n"); } +void usage() { strerr_die4x(1, "usage: ", progname, USAGE, "\n"); } -void warn (const char *s1, const char *s2, struct strerr *e) { - dir++; - rc++; +void warn(const char *s1, const char *s2, struct strerr *e) { + dir++; rc++; strerr_warn3(WARNING, s1, s2, e); } -int main (int argc, const char * const *argv) { +int main(int argc, const char * const *argv) { int opt; int verbose =0; char status[18]; @@ -66,7 +65,6 @@ int main (int argc, const char * const *argv) { warn(*dir, ": unable to change directory: ", &strerr_sys); continue; } - if ((fd =open_write("supervise/ok")) == -1) { if (errno == error_nodevice) warn(*dir, ": supervise not running.", 0); |