Bash process remains after I close rxvt in certain ways

Charles Wilson cygwin@cwilson.fastmail.fm
Mon Nov 13 15:08:00 GMT 2006


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/



More information about the Cygwin mailing list