Has anyone else had a problem with system() in the latest release of strawberry?
I need to spawn a separate process that runs independently from my main (index.pl) script so I can monitor the (child) script via pipes and have the main (index.pl) script act on the information relieved from the child process that needs to run in the background.
I have tried every conceivable format i can think of with 'system', 'exec', 'fork', 'POE::Component', 'IPC::Open3', 'IPC::Run', 'POE::Session', and 'Win32::Process', and several combinations/variations there of, but can not get a process to spawn seperate from the parent and run on. I either end up getting a "(70007)The timeout specified has expired: ap_content_length_filter: apr_bucket_read() failed" -or- "program is not recognized as an internal or external command, operable program or batch file" -or- some other similar error. Either the child process starts and hangs (waiting for the child to finish I assume, which it won't) or not launch the child at all.
The child is a node.js script that runs fine if I type the command from the windows command prompt.
I just recently switched from activestates perl to strawberry (v5.20.1) for MSWin32-x86-multi-thread-64int because activestate kept insisting I had to upgrade to business ($$$$) to install some of the key modules I need.
The OS is windows XP/sp3 and my project has come to a halt until I can get this 'child' script to startup, I don't want to have to start the child, everytime I startup the webserver, I just want my index.pl to spawn it out when it starts up.
You guys have been very helpful to me over the years and pretty much got me straightened out in my adventures... And I appreciate any insight as to what I'm doing wrong here. Thanx for listening to my sob story, and thanx a gig...
-Gary


I tried re-inventing the wheel again, but everytime I push it, it still falls flat on it's side...

In reply to system() function by PriNet

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.