in reply to waitpid on Win32 ... wait forever

The presented code works fine for me using ActivePerl 5.6.0, 5.6.1, 5.8.0, 5.8.8, 5.8.9 and 5.10.0 on WinXP. Could it be that a pipe fills up when the actual program is used?

Replies are listed 'Best First'.
Re^2: waitpid on Win32 ... wait forever
by syphilis (Archbishop) on May 08, 2009 at 07:14 UTC
    The presented code works fine for me

    Yep, me too :-)
    Seems that the contents of $cmd (which I changed just prior to posting) can have an effect. Try instead with:
    my $cmd = 'dir';
    Cheers,
    Rob
      The dir command works fine for me until I chdir to a larger directory, at which point dir never completes because it blocks writing to the full pipe attached to STDOUT. Just like I predicted.