delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/11/13/07:59:32

X-Spam-Check-By: sourceware.org
Message-ID: <45586C29.4050805@byu.net>
Date: Mon, 13 Nov 2006 05:59:21 -0700
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Thunderbird/1.5.0.8 Mnenhy/0.7.4.666
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>
In-Reply-To: <ej7u2n$mgb$1@sea.gmane.org>
X-IsSubscribed: yes
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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Lilja on 11/12/2006 12:52 PM:
> I recently upgraded to a dual core machine which made me use the windows
> task manager alot. That's when I noticed that if I close the rxvt window
> by pressing 'x' in the top right corner (or doing alt-f4, I never do
> this, just tried it now to see what happened) the rxvt process is
> terminated and the window disappears but the "underlying" bash process
> is still running (without a visible window), consuming ~3.5 MB of memory
> and 0 cpu time according to the task manager.

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.

> If I exit rxvt by typing
> exit, the bash process is terminated too.

Actually, typing exit will exit bash, not rxvt; but when rxvt realizes
that all of its children processes have exited, it exits as well.

> Can I do something so the bash
> process is always terminated properly no matter how I close the rxvt
> window? 

Submit a patch to make cygwin processes recognize Alt-F4 as a SIGHUP that
needs to be passed to their children?  Or possibly even a patch such that
when a controlling pty terminal is closed, all children (such as bash)
reading from that pty get an end-of-input (possibly a SIGPIPE) when trying
to read from the disappearing terminal?

> Is there misconfiguration on my end or should I simply get in
> the habit of always using exit to close rxvt?

For now, that is the best course of action.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFWGwp84KuGfSFAYARAhoLAJ4mOFhGOWHcWVFqT1TUminyFF2/3wCgkWST
Ibeyo2qq9zIyLaopU7CY3rM=
=5ncP
-----END PGP SIGNATURE-----

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