This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bash process remains after I close rxvt in certain ways

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_QUIT:
case WM_CLOSE:
event->type = ClientMessage;
event->xclient.format = 32;
event->[0] = XInternAtom(NULL,"WM_DELETE_WINDOW", FALSE);

... 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->[0] == h->xa[XA_WMDELETEWINDOW])

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


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]