help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Notice when parent login shell terminated?


From: Greg Wooledge
Subject: Re: [Help-bash] Notice when parent login shell terminated?
Date: Tue, 29 Oct 2013 08:05:06 -0400
User-agent: Mutt/1.4.2.3i

On Tue, Oct 29, 2013 at 11:51:38AM +0000, adrelanos wrote:
> Is it possible for a "& disown"'ed bash script to notice when its parent
> login shell terminated?

Only by polling the PID, which has many problems associated with it.
(The fact that the child has been disowned is not relevant; the answer
is the same either way.)

If you require reliability here, then the parent must take some action
as it is terminating (either by trap EXIT, or by putting commands in
~/.bash_logout), to inform the child.



reply via email to

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