help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] get pid of exited process


From: Stas Sergeev
Subject: Re: [Help-bash] get pid of exited process
Date: Mon, 4 Jan 2016 17:47:27 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

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 you can't, then it sounds like you want a child process that has the
ability to interact with a terminal device (i.e. is NOT a background job
created by a shell).  That sounds like a job for C.
That's what I mentioned in this msg:
http://lists.gnu.org/archive/html/help-bash/2016-01/msg00006.html
I'd wish a better syntax for that work-around, but it works.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]