Patch to enable init.d script to handle 0 byte PIDFILE
Brought to you by:
sindre_mehus
Under certain conditions the PIDFILE
created by the init.d
script delivered by the rpm installer, can end up as a 0 byte file.
Once this happens, the test done in the init script to determine the if the process is running fails.
Instead of manually testing for the process by running ps
, we should use the LSB init functions ( http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html )
Attached is a patch that uses the standard lsb init function pidofproc
to test for the process instead of running ps
. This correctly deals with at 0 byte PIDFILE
Anonymous
Ah sorry, I wasn't logged in. This patch is from me.