Bugzilla – Bug 17708
squeezecenter_safe does not wait for squeezecenter-binary to die
Last modified: 2011-12-11 06:33:14 UTC
When the squeezecenter_safe script gets a signal to stop the squeezecenter-binary it just send a kill to the binary and then immediately exits regardless how long time it takes for the squeezecenter-binary to quit. This means that the init script that uses squeezecenter_safe script will think that squeezecenter is always stopped immediately. There is a big risk that when doing an restart the init script will start a new squeezecenter-binary before the old one has exit. The fix i quit simple just change the code function clean_up { # Kill the SqueezeCenter daemon if it is running kill $SLIMPID echo `date "+%F %H:%M:%S"` "squeezecenter_safe stopped." >> /var/log/squeezecenter/server.log exit } to }function clean_up { # Kill the SqueezeCenter daemon if it is running kill $SLIMPID echo `date "+%F %H:%M:%S"` "squeezecenter_safe stopped." >> /var/log/squeezecenter/server.log wait $SLIMPID exit $? }