From e734fdcae9056b490887566967abc5be72982e16 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 1 Jan 2007 19:37:19 +0000 Subject: [PATCH] * spawn.cc (spawn_guts): Don't expect synchronization from a non-cygwin _P_NOWAIT process. --- winsup/cygwin/ChangeLog | 7 ++++++- winsup/cygwin/spawn.cc | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 946f758d7..521e0f323 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2007-01-01 Christopher Faylor + + * spawn.cc (spawn_guts): Don't expect synchronization from a non-cygwin + _P_NOWAIT process. + 2006-12-21 Corinna Vinschen * fhandler_disk_file.cc (fhandler_disk_file::readdir): Improve debug @@ -21,7 +26,7 @@ 2006-12-18 Christopher Faylor * pinfo.cc (set_myself): Use a more foolproof method for determining if - the current process was started from another cygiwn process. + the current process was started from another cygwin process. 2006-12-15 Pierre A. Humblet diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 352e51c87..44bf8ee24 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -673,7 +673,10 @@ loop: sigproc_printf ("spawned windows pid %d", pi.dwProcessId); - synced = ch.sync (pi.dwProcessId, pi.hProcess, INFINITE); + if ((mode == _P_DETACH || mode == _P_NOWAIT) && !ch.iscygwin ()) + synced = false; + else + synced = ch.sync (pi.dwProcessId, pi.hProcess, INFINITE); switch (mode) {