Description of problem: I have an application that takes a USR2 signal, and does fancy things with it. I added a 'reload' feature to the init script in /etc/init.d for this service. It would invoke: killproc $prog USR2 This would end up sending: kill USR2 $pid This is bad, because it sends a TERM signal to the process, and not USR2 I've modified my script, so it now says: killproc $prog -USR2 This seems wrong to me somehow. Can we fix the function definition to be clear as to what it expects. The usage for killproc indicates a signal should be provided, but not that the hyphen is necessary... Version-Release number of selected component (if applicable): This is observed in initscripts 8.31.1-1 in FC5, and whatever initscripts are in RHEL4 How reproducible: . /etc/init.d/functions killproc $prog USR2 Actual results: Sends TERM to prog Expected results: Sends USR2 to prog Additional info: I notice that kill has a -s flag, which could be used in this case, but that would break scripts that have been modified as mine have.
The killproc init script function is specified in the LSB. It would be possible to change the function for non-LSB scripts, but that would only add to the confusion; therefore I think the best option is to keep the current interface. I did change the killproc usage message to include the hyphen, though. Thanks for your report.