delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40 |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <4B8BEACA.4010003@towo.net> |
References: | <201002261446 DOT o1QEki2k024924 AT mail DOT bln1 DOT bf DOT nsn-intra DOT net> <416096c61002261229j31f92387u8b8e3e9b716cb131 AT mail DOT gmail DOT com> <4B8BEACA DOT 4010003 AT towo DOT net> |
Date: | Thu, 4 Mar 2010 07:49:28 +0000 |
Message-ID: | <416096c61003032349h6f22d223v7aa03c07f4f27475@mail.gmail.com> |
Subject: | Re: terminals getting killed on parent's termination |
From: | Andy Koppe <andy DOT koppe AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
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 |
Thomas Wolff: > Andy Koppe: >> Mintty has default handling for SIGHUP, i.e. it exits. > > Actually (another topic but related) mintty has a great feature here: it > passed the SIGHUP to its client application and if that application catches > and handles the SIGHUP, mintty does *not* exit. I don't think that's true. See signal_thread() in child.c: if mintty receives a SIGINT, SIGTERM, or SIGHUP, it sends a SIGHUP to the child process to say that the terminal is disappearing and then exits immediately. (I'm not convinced that sending the SIGHUP manually should be necessary actually, i.e. I'd have expected SIGHUP to automatically be sent to attached processes when the master side of the pty is closed due to mintty exiting. But I haven't got 'round to look into this properly.) > This enables an application > to be embedded into mintty as a terminal container and implement some > reasonable "Really exit?" behaviour with the option not to exit. > I suspect though, that this feature might not be on purpose since the > semantics of SIGHUP would be slightly tweaked here. Anyway, it's very > useful, so I'd like to ask to please make it a defined feature to rely on This conflicts with your request for mintty to ignore SIGHUP. Andy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |