in reply to Re^2: Waitpid does not work as expected in Windows
in thread Waitpid does not work as expected in Windows

I did not know that pids in Windows were negative.

They're not. That's why negative numbers were used to id the pseudo-processes created by fork.

Do you know what causes this incompatibility?

The usual possibilities:

On the Perl side, every variable gets copied when you create a new thread. That makes Perl code more-or-less thread-safe by default. But that's not the case on the C component of XS modules. C variables are shared among threads "by default".

Workarounds:

Replies are listed 'Best First'.
Re^4: Waitpid does not work as expected in Windows
by athanasia (Pilgrim) on Sep 29, 2008 at 12:11 UTC
    Your suggestion to require the module instead of 'using' it did the work. Thanks a lot for all the useful info and help!
    Athanasia