www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/09/04/22:45:39

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Tue, 4 Sep 2001 22:45:34 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Re: 1.3.2: setsid() vs. signals
Message-ID: <20010904224534.A12588@redhat.com>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
References: <3B94BC33 DOT CACAEAF4 AT trustcenter DOT de> <s1slmju76d5 DOT fsf AT jaist DOT ac DOT jp> <20010904215335 DOT D11902 AT redhat DOT com> <s1sk7ze74ud DOT fsf AT jaist DOT ac DOT jp>
Mime-Version: 1.0
In-Reply-To: <s1sk7ze74ud.fsf@jaist.ac.jp>
User-Agent: Mutt/1.3.21i

On Wed, Sep 05, 2001 at 11:23:54AM +0900, Kazuhiro Fujieda wrote:
>>>> On Tue, 4 Sep 2001 21:53:35 -0400
>>>> Christopher Faylor <cgf AT redhat DOT com> said:
>
>> >This is a bug in Cygwin DLL 1.3.2 and also in the latest snapshot.
>> >I will fix it in the next release.
>> 
>> Does this mean that you're going to send in a patch for 1.3.3?
>
>No, but I found the cause of his problem. That's the following
>change of yours. It made the handler trigger SIGINT to the process
>without its controlling terminal. I'd like to propose to revert it.
>
>Index: exceptions.cc
>===================================================================
>RCS file: /cvs/src/src/winsup/cygwin/exceptions.cc,v
>retrieving revision 1.79
>retrieving revision 1.80
>diff -u -p -r1.79 -r1.80
>--- exceptions.cc	2001/05/03 15:00:38	1.79
>+++ exceptions.cc	2001/05/04 20:39:38	1.80
>@@ -892,8 +892,8 @@ ctrl_c_handler (DWORD type)
>   tty_min *t = cygwin_shared->tty.get_tty (myself->ctty);
>   /* Ignore this if we're not the process group lead since it should be handled
>      *by* the process group leader. */
>-  if (!t->getpgid () || t->getpgid () != myself->pid ||
>-      (GetTickCount () - t->last_ctrl_c) < MIN_CTRL_C_SLOP)
>+  if (t->getpgid () && (t->getpgid () != myself->pid ||
>+      (GetTickCount () - t->last_ctrl_c) < MIN_CTRL_C_SLOP))
>     return TRUE;
>   else
>     /* Otherwise we just send a SIGINT to the process group and return TRUE (to indicate

Ok.  I've semi-reverted that patch and added an additional test for
myself->ctty == -1.  This code should not be activated if there is no
controlling terminal.

Thanks for tracking this down.

cgf

- Raw text -


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