On Mon, Jan 04, 2016 at 05:47:27PM +0300, Stas Sergeev wrote:
04.01.2016 17:22, Greg Wooledge ??????????:
On Mon, Jan 04, 2016 at 05:15:03PM +0300, Stas Sergeev wrote:
As I explained in the same mail, I need it for cleanups:
if the program crashes, the script should remove the
stalled sockets/fifos that usually embed the pid in their
names.
Eh? If the program exits, it should clean up its own sockets. Can't you
fix the program, instead of trying to write this workaround wrapper?
Well, fixing program is certainly good, but even if I could,
please don't forget about "kill -9", in which case the stalled
resources are unavoidable.
If someone is killing the program with kill -9, then your answer is to
STOP THAT PERSON FROM DOING THAT. This is not a technological problem.
It's a human resources problem.
Never, ever use kill -9 unless you are prepared to clean up the mess
personally.