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 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: <45586C29 DOT 4050805 AT byu DOT net> In-Reply-To: <45586C29.4050805@byu.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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/