Bug 174712

Summary: killing xterm kills its children
Product: [Fedora] Fedora Reporter: Jonathan Kamens <jik>
Component: xtermAssignee: Jason Vas Dias <jvdias>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-12-01 21:52:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jonathan Kamens 2005-12-01 17:06:04 UTC
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 
dies.

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

  jik

Comment 1 Jason Vas Dias 2005-12-01 21:52:15 UTC
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"; };'