FS#16965 - [preload] init script fails to stop cleanly
Attached to Project:
Community Packages
Opened by Ray Rashif (schivmeister) - Sunday, 01 November 2009, 20:23 GMT
Last edited by Ionut Biru (wonder) - Monday, 02 November 2009, 20:47 GMT
Opened by Ray Rashif (schivmeister) - Sunday, 01 November 2009, 20:23 GMT
Last edited by Ionut Biru (wonder) - Monday, 02 November 2009, 20:47 GMT
|
Details
== Description ==
The preload executable itself does not register a pid, so the script (which kills using $PID) fails when shutting the system down. == Reproduction == ~# /etc/rc.d/preload stop [FAIL] And then by removing the redirect to /dev/null: ~# kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] And by issuing an echo $PID after it is defined outputs nothing, as well as: ~# /usr/sbin/preload ~# ps ax | grep preload == Workaround/Solution == I haven't had time to investigate this, but a quick brainstorm tells me creating a pid file and checking for it would suffice. |
This task depends upon
echo $PID
stop
...
31152
:: Stopping preload daemon: [DONE]
Now it works after maintenance update for
FS#16765, even though I don't see what has changed to rectify this.pidof /usr/sbin/preload suddenly returns something, and the other reporter should've faced this as well but he didn't. I consistently saw it failing over multiple shutdowns, so it may or may not surface again if it depends on some weird state to reproduce. I had the previous version in cache, reinstalled, and this doesn't happen.