Re: bash sends SIGHUP to disowned children in non-interactive mode
From:
Sven Mascheck
Subject:
Re: bash sends SIGHUP to disowned children in non-interactive mode
Date:
Wed, 28 Dec 2011 20:19:02 +0100
User-agent:
Mutt/1.5.20 (2009-06-14)
On Wed, Dec 28, 2011 at 01:47:47PM -0500, Greg Wooledge wrote:
> On Wed, Dec 28, 2011 at 07:44:40PM +0100, ck850@web.de wrote:
> > (xclock &)
>
> > Yet xclock closes when the script exits because it receives a SIGHUP.
>
> If you want a process to ignore a signal, you should either use nohup(1),
> or ignore the signal yourself using a trap and then exec it.
You could also "disown -h" it and avoid that the signal is sent at all.
This is especially helpful, if a program resets its signal handlers
(e.g. xemacs?).