Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 119105 Details for
Bug 178274
start-stop-daemon checks for pidfile too quickly in some cases
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
If pidfile does not exist or is empty, continue
ssd-waitpid.patch (text/plain), 1.37 KB, created by
Roy Marples (RETIRED)
on 2007-05-13 11:00:37 UTC
(
hide
)
Description:
If pidfile does not exist or is empty, continue
Filename:
MIME Type:
Creator:
Roy Marples (RETIRED)
Created:
2007-05-13 11:00:37 UTC
Size:
1.37 KB
patch
obsolete
>Index: src/start-stop-daemon.c >=================================================================== >--- src/start-stop-daemon.c (revision 2696) >+++ src/start-stop-daemon.c (working copy) >@@ -962,6 +962,7 @@ > if (START_WAIT > 0) { > struct timeval stopat; > struct timeval now; >+ bool retestpid = false; > > if (gettimeofday (&stopat, NULL) != 0) > eerrorx ("%s: gettimeofday: %s", progname, strerror (errno)); >@@ -991,11 +992,21 @@ > if (kill (pid, 0) == 0) > alive = true; > } else { >- if (pidfile && rc_exists (pidfile)) { >- if (do_stop (NULL, NULL, pidfile, uid, 0, true, false, true) > 0) >+ if (pidfile) { >+ /* The pidfile may not have been written yet - give it some time */ >+ if (get_pid (pidfile, true) == -1) { > alive = true; >+ retestpid = true; >+ } else { >+ retestpid = false; >+ >+ if (do_stop (NULL, NULL, pidfile, uid, 0, true, >+ false, true) > 0) >+ alive = true; >+ } > } else { >- if (do_stop (exec, cmd, NULL, uid, 0, true, false, true) > 0) >+ if (do_stop (exec, cmd, NULL, uid, 0, true, >+ false, true) > 0) > alive = true; > } > } >@@ -1006,6 +1017,12 @@ > if (timercmp (&now, &stopat, >)) > break; > } >+ >+ if (retestpid) { >+ if (do_stop (NULL, NULL, pidfile, uid, 0, true, >+ false, true) < 1) >+ eerrorx ("%s: %s died", progname, exec); >+ } > } > > if (svcname)
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 178274
: 119105