From: newsham AT lava DOT net (Tim Newsham) Subject: spawn and wait? 29 Dec 1997 15:52:11 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: gnu-win32 AT cygnus DOT com Hi, I'm not too clear on the semantics of spawn since I haven't come across any documentation for it. I assume its a way to spawn a process without the fork/exec expenses (using just 1 CreateProcess instead of two). So I ran some simple tests and found what I think might be a bug: #include main() { int stat; stat = spawnl(_P_NOWAIT, "/gnuwin32/b18/H-i386-cygwin32/bin/sleep.exe", "sleep", "5", 0); printf("spawned (%d). waiting\n", stat); wait(&stat); printf("status %x\n", stat); } when I run this I get: spawned (40). waiting [pause] wait_found: CloseHandle thread failed status 0 I tried other spawn flags and I seem to get that error when I use NOWAIT or NOWAITO. Cygwin version is based off of a sept snapshot with some local changes (nothing involving spawn or wait). Tim N. - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".