This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
spawn and wait?
- To: gnu-win32 at cygnus dot com
- Subject: spawn and wait?
- From: newsham at lava dot net (Tim Newsham)
- Date: Mon, 29 Dec 1997 12:05:38 -1000 (HST)
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 <process.h>
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@cygnus.com" with one line of text: "help".