diff options
author | Christopher Faylor <me@cgf.cx> | 2002-10-14 03:32:01 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-10-14 03:32:01 +0000 |
commit | 82fc7120754316442bbcd268170ad46bfa23b698 (patch) | |
tree | 8099c962b463e54ac746ce971d343811e7fab962 | |
parent | bfaa0919cbd75417d021c3cc75b307d1236e5e2b (diff) | |
download | newlib-github/unlabeled-1.116.4.zip newlib-github/unlabeled-1.116.4.tar.gz newlib-github/unlabeled-1.116.4.tar.bz2 |
* spawn.cc (spawn_guts): Fix so that cygthread::terminate is *really* calledgithub/unlabeled-1.116.4unlabeled-1.116.4
only for exec.
* cygthread.cc (cygthread::stub): Don't zero __name here. That introduces a
race.
-rw-r--r-- | winsup/cygwin/spawn.cc | 6 |
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) |