bug-bash
[Top][All Lists]
Advanced

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

Re: bash sends SIGHUP to disowned children in non-interactive mode


From: Greg Wooledge
Subject: Re: bash sends SIGHUP to disowned children in non-interactive mode
Date: Wed, 28 Dec 2011 14:48:45 -0500
User-agent: Mutt/1.4.2.3i

On Wed, Dec 28, 2011 at 08:37:38PM +0100, ck850@web.de wrote:
>    >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?).
>    What I am saying is, this is not working!
>    Please try if you can reproduce what I wrote.
>    If so try to use disown -h. Doesn't make a difference.

If you want to disown something, you have to *stop* doing this double-fork
nonsense.

#!/bin/bash
set -m
xterm &
disown -h

Do not put (...) around the background job.  When you do that, the main
bash process loses its parenthood over the xterm process, so it won't be
able to manage it.

I'm not 100% sure if the set -m will be required to enable "disown" to work,
but I'd try it that way.



reply via email to

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