I'm trying to produce an exe version of a script I've written and have run into trouble with the IPC::Run module. Both PAR::Packer and Perl2Exe produce errors with the code below:
#!/usr/bin/perl #perl2exe_include "attributes.pm"; use strict; use warnings; $|=1; use Symbol qw( gensym ); use IPC::Run qw( start ); use Tie::Handle; use IPC::Run::Win32IO; my %sp; $sp{'STDIN'} = gensym(); $sp{'STDOUT'} = gensym(); $sp{'STDERR'} = gensym(); my $h = start ['./cnc.exe'], '<pipe', $sp{'STDIN'}, '>pipe', $sp{'STDOUT'}, '2>pipe', $sp{'STDERR'} or die "returned $?"; sleep 20;
PAR::Packer generates the following when I attempt to run the resulting .exe:
Inappropriate I/O control operation: Win32::Process::Create() at C:\Us +ers\Izomiac\AppData\Local\Temp\par-4a6f7368\cache-6146a0a42031e00189f +f49a355f90de7875866db\inc\lib/IPC/Run.pm line 2143. Inappropriate I/O control operation: Win32::Process::Create() at C:\Us +ers\Izomiac\AppData\Local\Temp\par-4a6f7368\cache-6146a0a42031e00189f +f49a355f90de7875866db\inc\lib/IPC/Run.pm line 2244. Inappropriate I/O control operation: Win32::Process::Create() at C:\Us +ers\Izomiac\AppData\Local\Temp\par-4a6f7368\cache-6146a0a42031e00189f +f49a355f90de7875866db\inc\lib/IPC/Run.pm line 2244.

And Perl2Exe runs the .exe version dozens of times simultaneously.

For context, this script launches a half-dozen other scripts and coordinates communication between them by piping things through STDIN/STDOUT. I adopted this approach since one subprocess is a Tk GUI, another loads gigabytes of data into memory, and another is a 32 thread genetic sorting algorithm, and combining them into one process caused all sorts of instability. This version is faster and much more stable, but it's a big ask to have end-users install perl.

Any suggestions or alternatives?


In reply to PAR-Packer and IPC-Run by izomiac

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.