-w, --wait seconds

New option so you can set the number of seconds to wait for and
check the daemon is still running.
The old code that periodically polled wasn't that reliable - in this 
case simpler == better.
Fixes #160
This commit is contained in:
Roy Marples
2009-04-19 18:20:49 +00:00
parent e2942e34af
commit ee53e6ad29
2 changed files with 56 additions and 66 deletions

View File

@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd January 1, 2009
.Dd April 19, 2009
.Dt START-STOP-DAEMON 8 SMM
.Os OpenRC
.Sh NAME
@@ -140,6 +140,12 @@ Redirect the standard output of the process to logfile when started with
Must be an absolute pathname, but relative to the path optionally given with
.Fl r , -chroot .
The logfile can also be a named pipe.
.It Fl w , -wait Ar seconds
Wait
.Ar seconds
after starting and check that daemon is still running.
Useful for daemons that check configuration after forking or stopping race
conditions where the pidfile is written out after forking.
.It Fl 2 , -stderr Ar logfile
The same thing as
.Fl 1 , -stdout
@@ -160,7 +166,8 @@ can also set the scheduling priority of the daemon, but the command line
option takes precedence.
.Pp
.Va SSD_STARTWAIT
overrides the number of milliseconds set in
As the
.Fl w , -wait option above.
.Pa /etc/rc.conf
.Nm
waits for to check the daemon is still running.