Subject: spawn and wait?
From: [email-masked] (Tim Newsham)

29 Dec 1997 15:52:11 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
To: [email-masked]

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
"[email-masked]" with one line of text: "help".