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