Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Sep 2015 18:53:31 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        src-committers@freebsd.org
Cc:        svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r287864 - head/sys/kern
Message-ID:  <1476335.DNMxzjPDBI@ralph.baldwin.cx>
In-Reply-To: <201509161640.t8GGe8KD082156@repo.freebsd.org>
References:  <201509161640.t8GGe8KD082156@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, September 16, 2015 04:40:08 PM John Baldwin wrote:
> Author: jhb
> Date: Wed Sep 16 16:40:07 2015
> New Revision: 287864
> URL: https://svnweb.freebsd.org/changeset/base/287864
> 
> Log:
>   When a process group leader exits, all of the processes in the group are
>   sent SIGHUP and SIGCONT if any of the processes are stopped.  Currently this
>   behavior is triggered for any type of process stop including ptrace() stops
>   and transient stops for single threading during exit() and execve().
>   Thus, if a debugger is attached to a process in a group when the leader
>   exits, the entire group can be HUPed.  Instead, only send the signals if a
>   process in the group is stopped due to SIGSTOP.

In particular, gdb creates a new process group each time it runs a new
process.  If that process forks a child and gdb follows the child, the
child is killed with SIGHUP when the parent exits without this fix.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1476335.DNMxzjPDBI>