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
Task Type Bug Report
Category
Status Closed
Assigned To Ionut Biru (wonder)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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

Closed by  Ionut Biru (wonder)
Monday, 02 November 2009, 20:47 GMT
Reason for closing:  Not a bug
Comment by Ray Rashif (schivmeister) - Monday, 02 November 2009, 20:45 GMT
stop)
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.

Loading...