Bug 174712 - killing xterm kills its children
killing xterm kills its children
Product: Fedora
Classification: Fedora
Component: xterm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
Depends On:
  Show dependency treegraph
Reported: 2005-12-01 12:06 EST by Jonathan Kamens
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-12-01 16:52:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2005-12-01 12:06:04 EST
With all current devel packages, if I launch an xterm, then launch mozilla 
from in it, then send a kill signal to the xterm process, both it and mozilla 

Mozilla shouldn't die.  I don't think this used to happen, but I could be 

Comment 1 Jason Vas Dias 2005-12-01 16:52:15 EST
Yes, all child processes of a process group leader (eg. your xterm session)
must be killed when the leader is killed - this is basic job control behavior,
and has worked this way forever - the same happens with konsole / gnome-terminal.

To spawn a child process (e.g. mozilla) that becomes its own process group leader,
you could do: 
$ perl -e 'if ( fork() == 0 ) { setpgrp(); exec "/usr/bin/mozilla"; };'

Note You need to log in before you can comment on or make changes to this bug.