Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com From: Chris Faylor Date: Thu, 16 Sep 1999 22:11:49 -0400 To: DJ Delorie Cc: cygwin-developers AT sourceware DOT cygnus DOT com Subject: process group changes to cygwin Message-ID: <19990916221149.A5847@cygnus.com> Mail-Followup-To: DJ Delorie , cygwin-developers AT sourceware DOT cygnus DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i 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/