Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 207112 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.30 KB, created by
William Hubbs
on 2009-10-14 15:45:46 UTC
(
hide
)
Description:
fix-wait-time.patch
Filename:
MIME Type:
Creator:
William Hubbs
Created:
2009-10-14 15:45:46 UTC
Size:
2.30 KB
patch
obsolete
>From b932bf22350f46de25dc2d7a55da6829796f3a43 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 | 6 +++--- > src/rc/start-stop-daemon.c | 7 ++++--- > 2 files changed, 7 insertions(+), 6 deletions(-) > >diff --git a/man/start-stop-daemon.8 b/man/start-stop-daemon.8 >index 0175584..be51152 100644 >--- a/man/start-stop-daemon.8 >+++ b/man/start-stop-daemon.8 >@@ -22,7 +22,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > .\" SUCH DAMAGE. > .\" >-.Dd September 4, 2009 >+.Dd October 14, 2009 > .Dt START-STOP-DAEMON 8 SMM > .Os OpenRC > .Sh NAME >@@ -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