aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/spawn.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index b3bf304..6bc76fb 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -715,8 +715,10 @@ spawn_guts (const char * prog_arg, const char *const *argv,
cygheap->fdtab.fixup_before_exec (pi.dwProcessId);
cygheap_setup_for_child_cleanup (newheap, &ciresrv, 1);
if (mode == _P_OVERLAY)
- ResumeThread (pi.hThread);
- cygthread::terminate ();
+ {
+ ResumeThread (pi.hThread);
+ cygthread::terminate ();
+ }
}
if (mode != _P_OVERLAY)