delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/08/12:50:26

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 8 May 2001 12:43:49 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: Re: Brainstorming a fix for CTRL-C handling in an emacs shell buf fer (non-TTY)
Message-ID: <20010508124349.B25238@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
References: <8F23E55D511AD5119A6800D0B76FDDE11E101F AT cpex3 DOT channelpoint DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <8F23E55D511AD5119A6800D0B76FDDE11E101F@cpex3.channelpoint.com>; from troy.noble@channelpoint.com on Tue, May 08, 2001 at 09:45:49AM -0600

On Tue, May 08, 2001 at 09:45:49AM -0600, Troy Noble wrote:
>Christopher,
>
>Here's yet another patch (hopefully at the location of the
>root problem this time).
>
>I'd like to see if you come to the same conclusion as I did.
>
>$ diff -b --unified=3 dtable.cc-orig dtable.cc
>--- dtable.cc-orig      Sat Apr 28 17:48:27 2001
>+++ dtable.cc   Tue May  8 06:36:00 2001
>@@ -120,7 +120,7 @@
>       cygheap->fdtab.init_std_file_from_handle (2, err, GENERIC_WRITE,
>"{stderr}");
>       /* Assign the console as the controlling tty for this process if we
>actually
>         have a console and no other controlling tty has been assigned. */
>-      if (myself->ctty < 0 && GetConsoleCP () > 0)
>+      if (ISSTATE(myself,PID_USETTY) && myself->ctty < 0 && GetConsoleCP ()
>> 0)
>        set_console_ctty ();
>     }
> }
>

This can't be right.  This says "If you are trying to use real ttys and you
have a tty, use the console."  That's not what the code was trying to do.

The "GetConsoleCP ()" call is supposed to determine if there is a
console associated with the process.  Apparently there is, for some
reason.  Apparently, the process which started Xemacs has or had a
cygwin pid associated with it so there is a process group associated
with the tty.

I checked in a patch to in ctrl_c_handler to avoid just returning if the
cygwin pid associated with the pgid of the console is dead.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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