summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--debian/implicit98
-rwxr-xr-xdebian/rules2
-rw-r--r--doc/svlogd.8.html10
-rw-r--r--man/runit-init.818
-rw-r--r--man/runit.817
-rw-r--r--man/runsv.812
-rw-r--r--man/runsvchdir.87
-rw-r--r--man/runsvctrl.843
-rw-r--r--man/runsvdir.828
-rw-r--r--man/runsvstat.815
-rw-r--r--man/svlogd.816
-rw-r--r--man/svwaitdown.814
-rw-r--r--man/svwaitup.818
-rw-r--r--man/utmpset.813
-rw-r--r--package/CHANGES10
-rw-r--r--src/runsv.c5
-rw-r--r--src/runsvctrl.c5
-rw-r--r--src/runsvctrl.dist2
-rw-r--r--src/svlogd.c2
19 files changed, 204 insertions, 131 deletions
diff --git a/debian/implicit b/debian/implicit
index e568223..241af22 100644
--- a/debian/implicit
+++ b/debian/implicit
@@ -3,69 +3,77 @@
 .PHONY: deb-checkdir deb-checkuid
 
 deb-checkdir:
-	test -e debian/control || ! : wrong directory
+	@test -e debian/control || sh -cx '! : wrong directory'
 deb-checkuid:
-	test "`id -u`" -eq 0 || ! : need root privileges
+	@test "`id -u`" -eq 0 || sh -cx '! : need root privileges'
 
 %.deb: %.deb-docs %.deb-DEBIAN
-	@rm -f $*.deb $*.deb-checkdir $*.deb-docs \
-	  $*.deb-docs-examples $*.deb-docs-base \
-	  $*.deb-DEBIAN $*.deb-DEBIAN-dir \
-	  $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums
+	@rm -f $*.deb $*.deb-checkdir $*.deb-docs $*.deb-docs-base \
+	  $*.deb-docs-docs $*.deb-docs-examples $*.deb-DEBIAN \
+	  $*.deb-DEBIAN-dir $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums
 
 %.deb-checkdir:
-	test -d debian/$* || ! : directory missing
-	test "`id -u`" -eq 0 || ! : need root privileges
+	@test -d debian/$* || sh -cx '! : directory debian/$* missing'
+	@test "`id -u`" -eq 0 || sh -cx '! : need root privileges'
 
 %.deb-docs-base:
 	: implicit
-	-rm -f debian/$*/usr/share/doc/$*/*
-	install -d -m0755 debian/$*/usr/share/doc/$*
-	install -m0644 debian/copyright debian/$*/usr/share/doc/$*/
-	install -m0644 debian/changelog \
-	  debian/$*/usr/share/doc/$*/changelog.Debian
-	test ! -r changelog || \
-	  install -m0644 changelog debian/$*/usr/share/doc/$*/
-	test -r debian/$*/usr/share/doc/$*/changelog || \
-	  mv debian/$*/usr/share/doc/$*/changelog.Debian \
-	    debian/$*/usr/share/doc/$*/changelog
-	gzip -9 debian/$*/usr/share/doc/$*/changelog*
+	@rm -f debian/$*/usr/share/doc/$*/* || :
+	@install -d -m0755 debian/$*/usr/share/doc/$*
+	: debian/$*/usr/share/doc/$*/
+	@sh -cx 'install -m0644 debian/copyright debian/$*/usr/share/doc/$*/'
+	@sh -cx 'install -m0644 debian/changelog \
+	  debian/$*/usr/share/doc/$*/changelog.Debian'
+	@test ! -r changelog || \
+	  sh -cx 'install -m0644 changelog debian/$*/usr/share/doc/$*/'
+	@test -r debian/$*/usr/share/doc/$*/changelog || \
+	  sh -cx 'mv debian/$*/usr/share/doc/$*/changelog.Debian \
+	    debian/$*/usr/share/doc/$*/changelog'
+	@gzip -9 debian/$*/usr/share/doc/$*/changelog*
+%.deb-docs-docs:
+	@for i in `cat debian/$*.docs 2>/dev/null || :`; do \
+	  sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/" || exit 1; \
+	done
+	@test ! -r debian/$*.README.Debian || \
+	  sh -cx 'install -m0644 debian/$*.README.Debian \
+	    debian/$*/usr/share/doc/$*/README.Debian'
+	@if test -r debian/$*.NEWS.Debian; then \
+	  sh -cx 'install -m0644 debian/$*.NEWS.Debian \
+	    debian/$*/usr/share/doc/$*/NEWS.Debian && \
+	      gzip -9 debian/$*/usr/share/doc/$*/NEWS.Debian'; \
+	fi
 %.deb-docs-examples:
-	rm -rf debian/$*/usr/share/doc/$*/examples
-	test ! -r debian/$*.examples || \
+	@rm -rf debian/$*/usr/share/doc/$*/examples
+	: debian/$*/usr/share/doc/$*/examples/
+	@test ! -r debian/$*.examples || \
 	  install -d -m0755 debian/$*/usr/share/doc/$*/examples
-	for i in `cat debian/$*.examples 2>/dev/null || :`; do \
-	  install -m0644 $$i debian/$*/usr/share/doc/$*/examples/ || exit 1; \
-	done
-%.deb-docs: %.deb-checkdir %.deb-docs-base %.deb-docs-examples
-	for i in `cat debian/$*.docs 2>/dev/null || :`; do \
-	  install -m0644 $$i debian/$*/usr/share/doc/$*/ || exit 1; \
+	@for i in `cat debian/$*.examples 2>/dev/null || :`; do \
+	  sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/examples/" \
+	    || exit 1; \
 	done
-	test ! -r debian/$*.README.Debian || \
-	  install -m0644 debian/$*.README.Debian \
-	    debian/$*/usr/share/doc/$*/README.Debian
-	test ! -r debian/$*.NEWS.Debian || \
-	  install -m0644 debian/$*.NEWS.Debian \
-	    debian/$*/usr/share/doc/$*/NEWS.Debian
-	gzip -9 debian/$*/usr/share/doc/$*/NEWS.Debian || :
-	: debian/$*/usr/share/doc/$*/ created
+%.deb-docs: %.deb-checkdir %.deb-docs-base %.deb-docs-docs %.deb-docs-examples
+	: debian/$*/usr/share/doc/$*/ ok
 
 %.deb-DEBIAN-base:
-	rm -rf debian/$*/DEBIAN
-	install -d -m0755 debian/$*/DEBIAN
-	for i in conffiles shlibs; do \
+	@rm -rf debian/$*/DEBIAN
+	: debian/$*/DEBIAN/
+	@install -d -m0755 debian/$*/DEBIAN
+	@for i in conffiles shlibs; do \
 	  test ! -r debian/$*.$$i || \
-	    install -m0644 debian/$*.$$i debian/$*/DEBIAN/$$i || exit 1; \
+	    sh -cx "install -m0644 debian/$*.$$i debian/$*/DEBIAN/$$i" \
+	      || exit 1; \
 	done
 %.deb-DEBIAN-scripts:
-	for i in preinst prerm postinst postrm; do \
+	@for i in preinst prerm postinst postrm; do \
 	  test ! -r debian/$*.$$i || \
-	    install -m0755 debian/$*.$$i debian/$*/DEBIAN/$$i || exit 1; \
+	    sh -cx "install -m0755 debian/$*.$$i debian/$*/DEBIAN/$$i" \
+	      || exit 1; \
 	done
 %.deb-DEBIAN-md5sums:
-	(cd debian/$* && \
-	find * -type f ! -regex '^DEBIAN/.*' -print0 |xargs -r0 md5sum \
-	  >DEBIAN/md5sums)
+	: debian/$*/DEBIAN/md5sums
+	@rm -f debian/$*/DEBIAN/md5sums
+	@cd debian/$* && find * -path 'DEBIAN' -prune -o \
+	  -type f -exec md5sum {} >>DEBIAN/md5sums \;
 %.deb-DEBIAN: %.deb-checkdir %.deb-DEBIAN-base %.deb-DEBIAN-scripts \
 	  %.deb-DEBIAN-md5sums
-	: debian/$*/DEBIAN/ created
+	: debian/$*/DEBIAN/ ok
diff --git a/debian/rules b/debian/rules
index 6809996..ab2c0b3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -96,7 +96,7 @@ install: deb-checkdir deb-checkuid build-stamp
 	install -d -m0755 "$(DIR)"/var/run/getty-5
 	ln -s /var/run/getty-5 "$(DIR)"/etc/runit/getty-5/supervise
 	# additional docs
-	install -m0755 -d "$(DIR)"/usr/share/doc/runit/debian
+	install -d -m0755 "$(DIR)"/usr/share/doc/runit/debian
 	for i in 1 2 3 ctrlaltdel; do \
 	  install -m0644 admin/runit/etc/debian/$$i \
 	    "$(DIR)"/usr/share/doc/runit/debian/; \
diff --git a/doc/svlogd.8.html b/doc/svlogd.8.html
index 000e0f0..b777a84 100644
--- a/doc/svlogd.8.html
+++ b/doc/svlogd.8.html
@@ -135,15 +135,17 @@ A character not a star (‘‘*’’) and not a plus (‘&l
 the next character in <i>pattern</i> in the log message one or more times. A star
 before the end of <i>pattern</i> matches any string in the log message that does
 not include the next character in <i>pattern</i>. A star at the end of <i>pattern</i>
-matches any string. 
+matches any string. <p>
+Timestamps optionally added by <b>svlogd</b> are not considered
+part of the log message. 
 <h2><a name='sect8'>Options</a></h2>
 
 <dl>
 
 <dt><b>-t</b> </dt>
-<dd>timestamp. Prefix each selected line with a
-precise timestamp (see <i><b>tai64n</b>(8)</i>) when writing to <i>log</i> or to standard error.
-</dd>
+<dd>timestamp. Prefix each selected line with
+a precise timestamp (see <i><b>tai64n</b>(8)</i>) when writing to <i>log</i> or to standard
+error. </dd>
 
 <dt><b>-tt</b> </dt>
 <dd>timestamp. Prefix each selected line with a human readable, sortable
diff --git a/man/runit-init.8 b/man/runit-init.8
index 7dc9f92..aa48cb1 100644
--- a/man/runit-init.8
+++ b/man/runit-init.8
@@ -6,7 +6,8 @@ init \- a UNIX process no 1
 [ 0 | 6 ]
 .SH DESCRIPTION
 .B runit-init
-is the first process the kernel starts. If
+is the first process the kernel starts.
+If
 .B runit-init
 is started as process no 1, it runs and replaces itself with
 .BR runit (8).
@@ -19,7 +20,8 @@ or
 .B init 6\fR:
 .TP
 .B init 0
-tells the Unix process no 1 to shutdown and halt the system. To signal
+tells the Unix process no 1 to shutdown and halt the system.
+To signal
 .BR runit (8)
 the system halt request,
 .B runit-init
@@ -32,7 +34,8 @@ Then a CONT signal is sent to
 .BR runit (8).
 .TP
 .B init 6
-tells the Unix process no 1 to shutdown and reboot the system. To signal
+tells the Unix process no 1 to shutdown and reboot the system.
+To signal
 .BR runit (8)
 the system reboot request,
 .B runit-init
@@ -47,13 +50,14 @@ and
 returns 111 on error, 0 in all other cases.
 .SH SEE ALSO
 runit(8),
+runsvdir(8),
+runsvchdir(8),
+utmpset(8),
 runsv(8),
 runsvctrl(8),
 runsvstat(8),
-runsvdir(8),
-runsvchdir(8),
-svlogd(8),
-utmpset(8)
+chpst(8),
+svlogd(8)
 .P
 http://smarden.org/runit/
 .SH AUTHOR
diff --git a/man/runit.8 b/man/runit.8
index a451316..4461065 100644
--- a/man/runit.8
+++ b/man/runit.8
@@ -5,13 +5,14 @@ runit \- a UNIX process no 1
 .B runit
 .SH DESCRIPTION
 .B runit
-must be run as Unix process no 1. It performs the system's
-booting, running, and shutdown in three Stages:
+must be run as Unix process no 1.
+It performs the system's booting, running, and shutdown in three Stages:
 .SH STAGE 1
 .B runit
 runs
 .I /etc/runit/1
-and waits for it to terminate. The system's one time tasks are done here.
+and waits for it to terminate.
+The system's one time tasks are done here.
 .I /etc/runit/1
 has full control of
 .I /dev/console
@@ -26,7 +27,8 @@ will skip stage 2 and enter stage 3.
 runs
 .IR /etc/runit/2 ,
 which should not return until system shutdown; if it crashes, it will be
-restarted. Normally
+restarted.
+Normally
 .I /etc/runit/2
 starts
 .BR runsvdir (8).
@@ -74,13 +76,14 @@ receives an INT signal, a ctrl-alt-del keyboard request is triggered.
 runit-init(8),
 runsvdir(8),
 runsvchdir(8),
+utmpset(8),
 runsv(8),
 runsvctrl(8),
 runsvstat(8),
-svwaitdown(8),
-svwaitup(8),
+chpst(8),
 svlogd(8),
-utmpset(8)
+svwaitdown(8),
+svwaitup(8)
 .P
 http://smarden.org/runit/
 .SH AUTHOR
diff --git a/man/runsv.8 b/man/runsv.8
index 70da0d3..769c7f2 100644
--- a/man/runsv.8
+++ b/man/runsv.8
@@ -86,8 +86,7 @@ After it stops, do not restart service.
 .B o
 Once.
 If the service is not running, start it.
-Do not restart it if it
-stops.
+Do not restart it if it stops.
 .TP
 .B p
 Pause.
@@ -109,6 +108,9 @@ If the service is running, send it a ALRM signal.
 Interrupt.
 If the service is running, send it a INT signal.
 .TP
+.B q
+Quit.
+If the service is running, send it a QUIT signal.
 .B 1
 User-defined 1.
 If the service is running, send it a USR1 signal.
@@ -172,13 +174,13 @@ exits 0 if it was told to exit.
 .SH SEE ALSO
 runsvctrl(8),
 runsvstat(8),
+chpst(8),
+svlogd(8),
 runit(8),
 runit-init(8),
 runsvdir(8),
 runsvchdir(8),
-svlogd(8),
-svwaitdown(8),
-svwaitup(8),
+utmpset(8)
 .P
 http://smarden.org/runit/
 .SH AUTHOR
diff --git a/man/runsvchdir.8 b/man/runsvchdir.8
index 30294c9..8e54cad 100644
--- a/man/runsvchdir.8
+++ b/man/runsvchdir.8
@@ -45,11 +45,14 @@ exits 0 on success.
  /etc/runit/runsvdir/current.new
 .SH SEE ALSO
 runsvdir(8),
+runit(8),
+runit-init(8),
 runsv(8),
 runsvctrl(8),
 runsvstat(8),
-runit(8),
-runit-init(8),
+chpst(8),
+svlogd(8),
+utmpset(8),
 svwaitdown(8),
 svwaitup(8)
 .P
diff --git a/man/runsvctrl.8 b/man/runsvctrl.8
index bf19bd5..d804e02 100644
--- a/man/runsvctrl.8
+++ b/man/runsvctrl.8
@@ -28,14 +28,17 @@ which must be controlled by
 .SH COMMANDS
 .TP
 .B up
-If the service is not running, start it. If the service stops, restart it.
+If the service is not running, start it.
+If the service stops, restart it.
 .TP
 .B down
-If the service is running, send it a TERM signal. If ./run exits,
-start ./finish if it exists. After it stops, do not restart service.
+If the service is running, send it a TERM signal.
+If ./run exits, start ./finish if it exists.
+After it stops, do not restart service.
 .TP
 .B once
-If the service is not running, start it. Do not restart it if it stops.
+If the service is not running, start it.
+Do not restart it if it stops.
 .TP
 .B pause
 If the service is running, send it a STOP signal.
@@ -52,11 +55,16 @@ If the service is running, send it a ALRM signal.
 .B interrupt
 If the service is running, send it a INT signal.
 .TP
+.B quit
+If the service is running, send it a QUIT signal.
+.TP
 .B 1
-User-defined 1. If the service is running, send it a USR1 signal.
+User-defined 1.
+If the service is running, send it a USR1 signal.
 .TP
 .B 2
-User-defined 2. If the service is running, send it a USR2 signal.
+User-defined 2.
+If the service is running, send it a USR2 signal.
 .TP
 .B term
 If the service is running, send it a TERM signal.
@@ -65,13 +73,17 @@ If the service is running, send it a TERM signal.
 If the service is running, send it a KILL signal.
 .TP
 .B exit
-If the service is running, send it a TERM signal. Do not restart the
-service. If the service is down, and no log service exists,
+If the service is running, send it a TERM signal.
+Do not restart the service.
+If the service is down, and no log service exists,
 .BR runsv (8)
-exits. If the service is down and a log service exists, send a TERM signal
-to the log service. If the log service is down,
+exits.
+If the service is down and a log service exists, send a TERM signal to the
+log service.
+If the log service is down,
 .BR runsv (8)
-exits. This command is ignored if it is given to
+exits.
+This command is ignored if it is given to
 .IR service /log/supervise/control.
 .P
 .BR runsvctrl
@@ -90,18 +102,21 @@ that caused an error (e.g. the directory is not controlled by a
 .BR runsv (8)
 process),
 .B runsvctrl
-increases the exit code by one and exits non zero. The maximum is 100.
+increases the exit code by one and exits non zero.
+The maximum is 100.
 .P
 .B runsvctrl
 exits 111 on error.
 .SH SEE ALSO
-runsvstat(8),
 runsv(8),
+runsvstat(8),
+chpst(8),
+svlogd(8),
 runit(8),
 runit-init(8),
 runsvdir(8),
 runsvchdir(8),
-svlogd(8),
+utmpset(8),
 svwaitdown(8),
 svwaitup(8)
 .P
diff --git a/man/runsvdir.8 b/man/runsvdir.8
index 7b6470d..9065bbc 100644
--- a/man/runsvdir.8
+++ b/man/runsvdir.8
@@ -31,19 +31,21 @@ At least every five seconds,
 .B runsvdir
 checks if
 .I dir
-has changed. If it sees a new subdirectory in
+has changed.
+If it sees a new subdirectory in
 .IR dir ,
 it starts a new
 .BR runsv (8)
-process. If it sees an old sudirectory where a
+process.
+If it sees an old sudirectory where a
 .BR runsv (8)
 process has exited, it restarts the
 .BR runsv (8)
 process.
 If
 .B runsvdir
-sees a subdirectory being removed that was previously there, it sends
-the corresponding
+sees a subdirectory being removed that was previously there, it sends the
+corresponding
 .BR runsv (8)
 process a TERM signal, stops monitoring this process, and so does not
 restart the
@@ -58,12 +60,12 @@ all output to standard error is redirected to this
 .IR log ,
 which is similar to the
 .BR readproctitle (8)
-log. To see the most recent error messages, use a process-listing tool
-such as
+log.
+To see the most recent error messages, use a process-listing tool such as
 .BR ps (1).
 .B runsvdir
-writes a dot to the readproctitle log every 15 minutes so that old
-error messages expire.
+writes a dot to the readproctitle log every 15 minutes so that old error
+messages expire.
 .P
 Normally
 .B runsvdir
@@ -81,15 +83,17 @@ receives a HUP signal, it sends a TERM signal to each
 .BR runsv (8)
 process it is monitoring and then exits with 111.
 .SH SEE ALSO
-runsvchdir(8),
 runsv(8),
-runsvctrl(8),
-runsvstat(8),
 runit(8),
 runit-init(8),
+runsvchdir(8),
+runsvctrl(8),
+runsvstat(8),
+chpst(8),
 svlogd(8),
+utmpset(8),
 svwaitdown(8),
-svwaitup(8),
+svwaitup(8)
 .P
 http://smarden.org/runit/
 .SH AUTHOR
diff --git a/man/runsvstat.8 b/man/runsvstat.8
index 9e68002..05bb491 100644
--- a/man/runsvstat.8
+++ b/man/runsvstat.8
@@ -28,7 +28,8 @@ of the corresponding
 .SH OPTIONS
 .TP
 .B \-l
-log service. Check for each
+log service.
+Check for each
 .I service
 if there exists a corresponding
 .I log
@@ -48,18 +49,20 @@ that caused an error (e.g. the directory is not controlled by a
 .BR runsv (8)
 process),
 .B runsvstat
-increases the exit code by one and exits non zero. The maximum is 100.
+increases the exit code by one and exits non zero.
+The maximum is 100.
 .P
 .B runsvstat
 exits 111 on error.
 .SH SEE ALSO
-runsvctrl(8),
 runsv(8),
-runsvdir(8),
-runsvchdir(8),
+runsvctrl(8),
+chpst(8),
+svlogd(8),
 runit(8),
 runit-init(8),
-svlogd(8),
+runsvdir(8),
+runsvchdir(8),
 svwaitdown(8),
 svwaitup(8)
 .P
diff --git a/man/svlogd.8 b/man/svlogd.8
index 93a58b1..5dd4f85 100644
--- a/man/svlogd.8
+++ b/man/svlogd.8
@@ -122,8 +122,8 @@ is started again.
 .B svlogd
 also saves any output that the
 .I processor
-writes to file descriptor 5, and make that output available on
-file descriptor 4 when it runs
+writes to file descriptor 5, and make that output available on file
+descriptor 4 when it runs
 .I processor
 on the next log file rotation.
 .P
@@ -282,6 +282,10 @@ character in
 A star at the end of
 .I pattern
 matches any string.
+.P
+Timestamps optionally added by
+.B svlogd
+are not considered part of the log message.
 .SH OPTIONS
 .TP
 .B \-t
@@ -370,12 +374,14 @@ with a non empty
 log file.
 .SH SEE ALSO
 runsv(8),
-runsvstat(8),
 runsvctrl(8),
-runsvdir(8),
-runsvchdir(8),
+runsvstat(8),
+chpst(8),
 runit(8),
 runit-init(8),
+runsvdir(8),
+runsvchdir(8),
+utmpset(8),
 multilog(8)
 .P
 http://smarden.org/runit/
diff --git a/man/svwaitdown.8 b/man/svwaitdown.8
index 9d78ed1..36321d7 100644
--- a/man/svwaitdown.8
+++ b/man/svwaitdown.8
@@ -95,23 +95,25 @@ For each
 .I service
 that causes an error while checking,
 .B svwaitdown
-increases the exit code by one and exits non zero. The maximum is 100.
+increases the exit code by one and exits non zero.
+The maximum is 100.
 .P
 .B svwaitdown
 returns 111 if the timeout
 .I sec
 was reached.
 .SH SEE ALSO
-svwaitdown(8),
+svwaitup(8),
 runsv(8),
 runsvctrl(8),
 runsvstat(8),
-runsvdir(8),
-runsvchdir(8),
+chpst(8),
+svlogd(8),
 runit(8),
 runit-init(8),
-supervise(8),
-svscan(8)
+runsvdir(8),
+runsvchdir(8),
+utmpset(8)
 .P
  http://smarden.org/runit/
  http://cr.yp.to/daemontools.html
diff --git a/man/svwaitup.8 b/man/svwaitup.8
index 476cce1..fe61ef6 100644
--- a/man/svwaitup.8
+++ b/man/svwaitup.8
@@ -13,7 +13,8 @@ svwaitup \- waits for services controlled by runsv(8) or supervise(8) to be up
 .I services
 .SH DESCRIPTION
 .I services
-consist of one or more arguments. Each
+consist of one or more arguments.
+Each
 .I service
 directory must start with a slash.
 .P
@@ -49,7 +50,8 @@ has to be up to
 .I sec
 seconds.
 .I sec
-must be between 2 and 600. Default is 2.
+must be between 2 and 600.
+Default is 2.
 .SH EXIT CODES
 .B svwaitup
 returns 0 as soon as all
@@ -82,7 +84,8 @@ checking (e.g.
 .BR runsv (8)
 is not running),
 .B svwaitup
-increases the exit code by one and exits non zero. The maximum is 100.
+increases the exit code by one and exits non zero.
+The maximum is 100.
 .P
 .B svwaitup
 returns 111 on error.
@@ -91,12 +94,13 @@ svwaitdown(8),
 runsv(8),
 runsvctrl(8),
 runsvstat(8),
-runsvdir(8),
-runsvchdir(8),
+chpst(8),
+svlogd(8),
 runit(8),
 runit-init(8),
-supervise(8),
-svscan(8)
+runsvdir(8),
+runsvchdir(8),
+utmpset(8)
 .P
  http://smarden.org/runit/
  http://cr.yp.to/daemontools.html
diff --git a/man/utmpset.8 b/man/utmpset.8
index 01dd442..8272af7 100644
--- a/man/utmpset.8
+++ b/man/utmpset.8
@@ -20,7 +20,8 @@ has logged out.
 .P
 Ordinary
 .BR init (8)
-processes handle utmp file records for local login accounting. The
+processes handle utmp file records for local login accounting.
+The
 .BR runit (8)
 program doesn't include code to update the utmp file, the
 .BR getty (8)
@@ -47,13 +48,15 @@ to the wtmp file.
 .B utmpset
 returns 111 on error, 1 on wrong usage, 0 in all other cases.
 .SH SEE ALSO
+runit(8),
+runit-init(8)
+runsvdir(8),
+runsvchdir(8),
 runsv(8),
 runsvctrl(8),
 runsvstat(8),
-runsvdir(8),
-runsvchdir(8),
-runit(8),
-runit-init(8),
+chpst(8),
+svlogd(8),
 getty(8)
 .P
 http://smarden.org/runit/
diff --git a/package/CHANGES b/package/CHANGES
index 08af5c3..74bed40 100644
--- a/package/CHANGES
+++ b/package/CHANGES
@@ -1,3 +1,13 @@
+runit 1.0.2
+Sun, 28 Mar 2004 18:16:54 +0000
+  * man/svlogd.8: timestamps are not considered when matching patterns (thx
+    Andras KORN).
+  * runsv.c: on exit run the finish scripts when taking the service down
+    (thx X.).
+  * runsv.c, runsvctrl.c: handle sig_quit (thx Wayne Marshall).
+  * svlogd.c: don't crash on zero byte long config file (thx Alex Efros).
+  * man/*: minor cleanup.
+
 runit 1.0.1
 Sun, 07 Mar 2004 10:40:40 +0000
   * doc/usedietlibc.html: minor.
diff --git a/src/runsv.c b/src/runsv.c
index 3445375..6072664 100644
--- a/src/runsv.c
+++ b/src/runsv.c
@@ -308,6 +308,9 @@ int ctrl(struct svdir *s, char c) {
   case 'i': /* sig int */
     if (s->pid) kill(s->pid, SIGINT);
     break;
+  case 'q': /* sig quit */
+    if (s->pid) kill(s->pid, SIGQUIT);
+    break;
   case '1': /* sig usr1 */
     if (s->pid) kill(s->pid, SIGUSR1);
     break;
@@ -512,7 +515,7 @@ int main(int argc, char **argv) {
     if (haslog)
       if (read(svd[1].fdcontrol, &ch, 1) == 1) ctrl(&svd[1], ch);
 
-    if (svd[0].want == W_EXIT && svd[0].pid == 0) {
+    if (svd[0].want == W_EXIT && svd[0].state == S_DOWN) {
       if (svd[1].pid == 0) _exit(0);
       if (svd[1].want != W_EXIT) {
 	svd[1].want =W_EXIT;
diff --git a/src/runsvctrl.c b/src/runsvctrl.c
index 21fe00d..20472a1 100644
--- a/src/runsvctrl.c
+++ b/src/runsvctrl.c
@@ -3,7 +3,7 @@
 #include "error.h"
 #include "open.h"
 
-#define USAGE " u|d|o|p|c|h|a|i|1|2|t|k|x|e service ..."
+#define USAGE " u|d|o|p|c|h|a|i|q|1|2|t|k|x|e service ..."
 
 #define VERSION "$Id$"
 
@@ -53,7 +53,8 @@ int main(int argc, char **argv) {
 
   switch ((c =**argv)) {
   case 'u': case 'd': case 'o': case 'x': case 'e': case 'p': case 'c':
-  case 'h': case 'a': case 'i': case 't': case 'k': case '1': case '2':
+  case 'h': case 'a': case 'i': case 't': case 'k': case 'q': case '1':
+  case '2':
     break;
   default:
     usage();
diff --git a/src/runsvctrl.dist b/src/runsvctrl.dist
index c80a757..b07cf8a 100644
--- a/src/runsvctrl.dist
+++ b/src/runsvctrl.dist
@@ -1,4 +1,4 @@
-usage: runsvctrl u|d|o|p|c|h|a|i|1|2|t|k|x|e service ...
+usage: runsvctrl u|d|o|p|c|h|a|i|q|1|2|t|k|x|e service ...
 
 1
 starting
diff --git a/src/svlogd.c b/src/svlogd.c
index a0c2b7e..7babdd6 100644
--- a/src/svlogd.c
+++ b/src/svlogd.c
@@ -349,7 +349,7 @@ unsigned int logdir_open(struct logdir *ld, const char *fn) {
     unsigned long port;
 
     if (verbose) strerr_warn4(INFO, "read: ", ld->name, "/config", 0);
-    for (i =0; i < sa.len -1; ++i) {
+    for (i =0; i +1 < sa.len; ++i) {
       if ((len =byte_chr(&sa.s[i], sa.len -i, '\n')) == 1) {
 	++i; continue;
       }