delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/11/13/11:10:36

X-Spam-Check-By: sourceware.org
Date: Mon, 13 Nov 2006 11:10:12 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Bash process remains after I close rxvt in certain ways
Message-ID: <20061113161012.GA6263@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <ej7u2n$mgb$1 AT sea DOT gmane DOT org> <45586C29 DOT 4050805 AT byu DOT net> <45588A58 DOT 3080704 AT cwilson DOT fastmail DOT fm> <loom DOT 20061113T161452-299 AT post DOT gmane DOT org>
Mime-Version: 1.0
In-Reply-To: <loom.20061113T161452-299@post.gmane.org>
User-Agent: Mutt/1.5.11
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Mon, Nov 13, 2006 at 03:18:56PM +0000, Eric Blake wrote:
>Charles Wilson <cygwin <at> cwilson.fastmail.fm> writes:
>
>> Or what *should* be happening.
>> 
>> So, I think that in src/command.c, right before exit() is called, rxvt 
>> ought to kill its children -- except I thought exit() should do that 
>> already?
>
>http://www.opengroup.org/onlinepubs/009695399/functions/exit.html:
>"Termination of a process does not directly terminate its children. The sending 
>of a SIGHUP signal as described below indirectly terminates children in some 
>circumstances.
>...
>"If the process is a controlling process, the SIGHUP signal shall be sent to 
>each process in the foreground process group of the controlling terminal 
>belonging to the calling process.
>"If the process is a controlling process, the controlling terminal associated 
>with the session shall be disassociated from the session, allowing it to be 
>acquired by a new controlling process.
>"If the exit of the process causes a process group to become orphaned, and if 
>any member of the newly-orphaned process group is stopped, then a SIGHUP signal 
>followed by a SIGCONT signal shall be sent to each process in the newly-
>orphaned process group."
>
>Sounds like you are right - rxvt should be a controlling process, so calling 
>exit() should automatically cause cygwin to send SIGHUP to the process group, 
>and rxvt shouldn't have to do any manual killing.

This is handled in dcrt0.cc:do_exit().  I'm wondering if rxvt is not
dealing with the SIGHUP that cygwin should be sending to it on
CTRL_CLOSE, though.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019