Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 206799 Details for
Bug 288495
rc_start_wait from openrc-0.5.1 in /etc/rc.conf doesn't looks like milliseconds, but seconds
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
fix-wait-time.patch
fix-wait-time.patch (text/plain), 2.09 KB, created by
William Hubbs
on 2009-10-11 18:46:25 UTC
(
hide
)
Description:
fix-wait-time.patch
Filename:
MIME Type:
Creator:
William Hubbs
Created:
2009-10-11 18:46:25 UTC
Size:
2.09 KB
patch
obsolete
>From ac9e6edf4f54b28d319c56b031702eb5b3b1bc2a Mon Sep 17 00:00:00 2001 >From: William Hubbs <w.d.hubbs@gmail.com> >Date: Sun, 11 Oct 2009 13:22:46 -0500 >Subject: [PATCH] fix wait time for gentoo bug 288495 > >The wait time was in seconds. This patch converts it to milliseconds. >--- > man/start-stop-daemon.8 | 4 ++-- > src/rc/start-stop-daemon.c | 7 ++++--- > 2 files changed, 6 insertions(+), 5 deletions(-) > >diff --git a/man/start-stop-daemon.8 b/man/start-stop-daemon.8 >index 0175584..42fed9f 100644 >--- a/man/start-stop-daemon.8 >+++ b/man/start-stop-daemon.8 >@@ -144,9 +144,9 @@ 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 >+.It Fl w , -wait Ar milliseconds > Wait >-.Ar seconds >+.Ar milliseconds > 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. >diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c >index d0ee93a..9f7af9b 100644 >--- a/src/rc/start-stop-daemon.c >+++ b/src/rc/start-stop-daemon.c >@@ -37,6 +37,7 @@ > #define POLL_INTERVAL 20000000 > #define WAIT_PIDFILE 500000000 > #define ONE_SECOND 1000000000 >+#define ONE_MS 1000000 > > #include <sys/types.h> > #include <sys/ioctl.h> >@@ -638,7 +639,7 @@ static const char * const longopts_help[] = { > "Test actions, don't do them", > "Change the process user", > "Chroot to this directory", >- "Seconds to wait for daemon start", >+ "Milliseconds to wait for daemon start", > "Binary to start/stop", > "Redirect stdout to file", > "Redirect stderr to file", >@@ -1311,8 +1312,8 @@ start_stop_daemon(int argc, char **argv) > struct timespec ts; > bool alive = false; > >- ts.tv_sec = start_wait; >- ts.tv_nsec = 0; >+ ts.tv_sec = start_wait / 1000; >+ ts.tv_nsec = (start_wait % 1000) * ONE_MS; > if (nanosleep(&ts, NULL) == -1) { > if (errno == EINTR) > eerror("%s: caught an interrupt", applet); >-- >1.6.4.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 288495
:
206796
| 206799 |
207112