perl is trying to execute another program, but there is not enought memory to run it. How can I validate that this is the case?
Well... here's a few thoughts: first change how you
are doing your forks:
:
: handwaving
:
my $pid=fork();
if ( $pid == 0 } {
: child process goes here
} elsif { $pid > 0 ) {
: parent process
wait(); # Wait for the child to exit
} else {
# WOAH! We should never get here!
die "fork returned $pid";
}
Within your child process instead of using backticks you
couold do the following
: child
open(PIPE,"some_command 2>&1 |")
or die $!;
my @output=<PIPD>;
close PIPE;
print @output;
This way if you fail to fork off the grandchild you
will see a diagnostic from die.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.