I am trying the function killproc -term and it seems to be doing
something extra that kill <pid> doesn't do. My daemon cleanly
terminates using kill, but not using killproc.
I tried strace on killproc and then killproc works well. I read online
that strace ignores SIGSTOP. does that mean killproc -term is sending
some silent SIGSTOP that is not letting the daemon cleanly terminate
(i.e. the behavior is different from calling kill).