AnyEvent::Util::run_cmd on Win32?

Rohan McGovern rohan at mcgovern.id.au
Thu Jul 26 01:49:49 CEST 2012


I found that run_cmd (from AnyEvent 7.01), with output redirection to
scalar, fails for me on
Windows:

  # bug.pl
  use AnyEvent::Util;
  my $output;
  my $status = run_cmd( [qw(perl -v)], '>' => \$out )->recv();
  print "status: $status\noutput: $output\n";

  > perl bug.pl
  fcntl is not implemented at
C:\Users\pulse\perl5\lib\perl5\MSWin32-x86-multi-thread/AnyEvent/Util.pm
line 607.

After having a look at the implementation of run_cmd, I saw that it
uses fork(), which led me
to believe it may be expected to not work on Windows. However, the
docs have some Win32
caveats mentioned for other functions, but not for run_cmd.

Anyone have comments on what can be expected from
AnyEvent::Util::run_cmd on Windows, or
suggestions for Coro/AnyEvent-aware alternatives?



More information about the anyevent mailing list