www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/03/15/14:31:21

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
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: Wed, 15 Mar 2000 14:30:28 -0500
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: Yet another hanging issue.
Message-ID: <20000315143028.A32468@cygnus.com>
Reply-To: cygwin-developers AT sourceware DOT cygnus DOT com
Mail-Followup-To: cgf AT cygnus DOT com, cygwin-developers AT sourceware DOT cygnus DOT com
References: <s1s66up1wg2 DOT fsf AT jaist DOT ac DOT jp> <20000314103313 DOT A15910 AT cygnus DOT com> <s1s3dpt1o8q DOT fsf AT jaist DOT ac DOT jp> <20000314124712 DOT A19647 AT cygnus DOT com> <s1szos03x3z DOT fsf AT jaist DOT ac DOT jp>
Mime-Version: 1.0
User-Agent: Mutt/1.1.8i
In-Reply-To: <s1szos03x3z.fsf@jaist.ac.jp>; from fujieda@jaist.ac.jp on Thu, Mar 16, 2000 at 03:29:52AM +0900

On Thu, Mar 16, 2000 at 03:29:52AM +0900, Kazuhiro Fujieda wrote:
>The latest fixes stop bash consuming a cpu, but typing `^Z'
>can't wake up its prompt.

Sorry.  I broke a cardinal rule and checked in some code without
testing it.  I removed some stuff that I thought was extraneous
in spawn.cc.  It wasn't.

The following patch should fix this problem.

cgf

Index: spawn.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/spawn.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- spawn.cc	2000/03/15 04:49:36	1.3
+++ spawn.cc	2000/03/15 19:29:15	1.4
@@ -635,8 +635,8 @@
     {
       BOOL exited;
 
-      HANDLE waitbuf[2] = {pi.hProcess, spr};
-      int nwait = 2;
+      HANDLE waitbuf[3] = {pi.hProcess, signal_arrived, spr};
+      int nwait = 3;
 
       SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_HIGHEST);
       res = 0;
@@ -675,6 +675,10 @@
 		  }
 	      break;
 	    case WAIT_OBJECT_0 + 1:
+	      sigproc_printf ("signal arrived");
+	      ResetEvent (signal_arrived);
+	      continue;
+	    case WAIT_OBJECT_0 + 2:
 	      res = EXIT_REPARENTING;
 	      MALLOC_CHECK;
 	      ForceCloseHandle (spr);

- Raw text -


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