This is the mail archive of the cygwin-developers@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Yet another hanging issue.


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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]