delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/09/16/22:12:19

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
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 <cgf AT cygnus DOT com>
Date: Thu, 16 Sep 1999 22:11:49 -0400
To: DJ Delorie <dj AT cygnus DOT com>
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 <dj AT cygnus DOT com>,
cygwin-developers AT sourceware DOT cygnus DOT com
Mime-Version: 1.0
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019