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

X-Spam-Check-By: sourceware.org
Message-ID: <45588A58.3080704@cwilson.fastmail.fm>
Date: Mon, 13 Nov 2006 10:08:08 -0500
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Thunderbird 1.5.0.8 (Windows/20061025)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Bash process remains after I close rxvt in certain ways
References: <ej7u2n$mgb$1 AT sea DOT gmane DOT org> <45586C29 DOT 4050805 AT byu DOT net>
In-Reply-To: <45586C29.4050805@byu.net>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

Eric Blake wrote:

> So far, no one has found a good way for a cygwin process killed by Alt-F4
> (or the X button) to treat that as a SIGHUP and pass that information on
> to all of its children processes.  So, by killing rxvt abruptly, you are
> indeed stranding bash as a zombie process.

Actually, I think rxvt/W11 already handles some of this; in 
W11/w32/event.c, MSWin messages WM_DESTROY, WM_QUIT, and WM_CLOSE ...

             case WM_DESTROY:
             case WM_QUIT:
             case WM_CLOSE:
                 event->type = ClientMessage;
                 event->xclient.format = 32;
                 event->xclient.data.l[0] = 
XInternAtom(NULL,"WM_DELETE_WINDOW", FALSE);
                 break;

... are all turned into an X11-style XA_WMDELETEWINDOW message, which is 
then handled (in src/command.c) by

     case ClientMessage:
         if (ev->xclient.format == 32
             && (Atom)ev->xclient.data.l[0] == h->xa[XA_WMDELETEWINDOW])
             exit(EXIT_SUCCESS);

(There is a little translation between the string "WM_DELETE_WINDOW", 
the struct h->xa, and the enum which defines XA_WMDELETEWINDOW, but 
that's basically what happens).

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?

--
Chuck



--
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