cURL / Mailing Lists / curl-library / Single Mail


Re: Running tests in Windows

From: Mohun Biswas <>
Date: Fri, 29 Apr 2005 09:11:49 -0400

Daniel Stenberg wrote:

> BTW, speaking of test script portability: today we start the HTTP and
> FTP servers from within by doing something like system("perl
> &"); which I'm considering turning this into a plain fork()
> and exec(). It'll reduce the risk for test server left-overs. Is the
> perl fork() function working sufficiently good on Windows to allow this?
> Anyone here that knows?

See "perldoc perlfork" if you haven't.

My experience is that, for basic fork/exec/wait functionality, it's
solid in 5.8.* and less so if you still need to support 5.6.*. It
actually works in 5.6.1 but a behavior I've observed[*] is that if the
child "process" creates multiple subprocesses wait() gets mixed up and
loses track of some children. I.e. if the child does a


everything works fine. If the child does a

        system("foo | bar");

then the parent wait gets confused. This does not seem to be a problem
with 5.8, specifically the 5.8.6 build 811 from ActiveState.

[*] I did not rigorously confirm that multiple grandchild processes were
the problem but that's how we encountered it and it did go away with 5.8.
Received on 2005-04-29