Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm 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: 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: <20000314103313 DOT A15910 AT cygnus DOT com> <20000314124712 DOT A19647 AT cygnus DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.1.8i In-Reply-To: ; 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);