* sigproc.cc (child_info::sync): Move check for !wr_proc_pipe lower.
* spawn.cc (spawn_guts): Correct check for top-level process.
This commit is contained in:
		| @@ -819,10 +819,6 @@ bool | ||||
| child_info::sync (pid_t pid, HANDLE& hProcess, DWORD howlong) | ||||
| { | ||||
|   bool res; | ||||
|   if (!subproc_ready && !myself->wr_proc_pipe) | ||||
|     res = false; | ||||
|   else | ||||
|     { | ||||
|   HANDLE w4[2]; | ||||
|   unsigned n = 0; | ||||
|   unsigned nsubproc_ready; | ||||
| @@ -846,7 +842,7 @@ child_info::sync (pid_t pid, HANDLE& hProcess, DWORD howlong) | ||||
|     } | ||||
|   else | ||||
|     { | ||||
| 	  if (type == _PROC_EXEC && x == nsubproc_ready) | ||||
|       if (type == _PROC_EXEC && x == nsubproc_ready && myself->wr_proc_pipe) | ||||
| 	{ | ||||
| 	  ForceCloseHandle1 (hProcess, childhProcess); | ||||
| 	  hProcess = NULL; | ||||
| @@ -854,7 +850,6 @@ child_info::sync (pid_t pid, HANDLE& hProcess, DWORD howlong) | ||||
|       sigproc_printf ("process %d synchronized, WFMO returned %d", pid, x); | ||||
|       res = true; | ||||
|     } | ||||
|     } | ||||
|   return res; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -815,7 +815,7 @@ spawn_guts (const char * prog_arg, const char *const *argv, | ||||
|     { | ||||
|     case _P_OVERLAY: | ||||
|       myself.hProcess = pi.hProcess; | ||||
|       if (!synced && !myself->wr_proc_pipe) | ||||
|       if (synced && !myself->wr_proc_pipe) | ||||
| 	{ | ||||
| 	  extern bool is_toplevel_proc; | ||||
| 	  is_toplevel_proc = true; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user