http://www.perlmonks.org?node_id=811586


in reply to Re^3: why IPC::Open3 can't execute MS-DOS "dir" command?
in thread why IPC::Open3 can't execute MS-DOS "dir" command?

the code was untested.

I don't have time to look at this just now, but it's surely a problem with socketpair's args.

Start by changing

_pipe(*TO_CHLD_R, *TO_CHLD_W ) or die $!; _pipe(*FR_CHLD_R, *FR_CHLD_W ) or die $!; _pipe(*FR_CHLD_ERR_R, *FR_CHLD_ERR_W) or die $!;
to
_pipe(*TO_CHLD_R, *TO_CHLD_W ) or die $^E; _pipe(*FR_CHLD_R, *FR_CHLD_W ) or die $^E; _pipe(*FR_CHLD_ERR_R, *FR_CHLD_ERR_W) or die $^E;
to get a better error message.