In my company I have seen use killall -9
to kill daemons and then start them again. (Which should really be killall -SIGKILL
)
I am trying to explain to colleagues that this shouldn't really be the way we restart daemons. Maybe use the SIGINT
symbol so that the process can shutdown correctly or use the init.d
scripts to correctly restart the service.
We program in C
so is there anything that could occur that would be detrimental to the system from doing a SIGKILL
? Obviously this signal cannot be caught by the process so no internal signal handlers can do any nice shutdown processing, but
- Would file read/write buffers be flushed correctly?
- Would dynamically memory be reclaimed correctly?
- Any other examples?
I could guess at the answers to these questions but does anyone know the answers? Can anyone flex their Unix knowledge to help me out? Armed with concrete knowledge I can put across a much better argument!