delorie.com/archives/browse.cgi | search |
I've made some more process group changes to cygwin. In particular, the case of: bash% vim& now seems to do the right thing -- it stops vim without writing anything to the screen. This was a case of detecting background operations for more than just the _write -- there is a class of termio operations which also cause a background stop. In the last several months, I've been generalizing the functions that are common between ttys and consoles into a fhandler_termios base class (which is a terrible name in retrospect). For this work, I added a bg_check() method for dealing with the case where a process should block because it's doing something "in the background" which requires the tty. Another thing that I've done is to change the way CTRL-C's are handled by cygwin. In the past there was a vain attempt to use Microsoft's CTRL-C handling mechanism but it is just too different than UNIX's. There is something called a "process group" on Microsoft but it is not easily manipulatable and seemed pretty worthless for what we need. So, this should now work. bash% sleep 60 & bash% fg ^C bash% and this: bash% sleep 60& bash% sleep 60 ^C bash% They didn't work too well before. In particular, for the second case, you always end up killing the backgrounded sleep. Unfortunately, this is still the case for a non-cygwin process since it falls into the same Windows process group and will accept the CTRL-C even it it shouldn't as far as the UNIX paradigm is concerned. Fixing that one will be tricky. I'd hoped to try this all out with 'make check' today but I ran out of cycles. The reason I wanted to try this is that "make check" seems to have been somewhat busted in recent snapshots and I wanted to see if this fixed anything. -- cgf AT cygnus DOT com http://www.cygnus.com/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |