Hi all,

My first post here - hope somebody can help. I'm on Linux - Slackware 12.2 32 bit and Slackware 13.0 64 bit. Both using Perl 5.10.0 as distributed by Slackware. I have 4Gb RAM.

My actual script creates two large arrays, writes some files and then runs a system command to execute PovRay raytracer. It works fine on Slackware 12.2 32 bit but fails on Slackware 13.0 64 bit. The problem is that on Slackware 13.0 64 bit the system command fails to execute. It fails silently and the return code is 0.

I have created a small demo script, see below, which shows the fault using system("date"); It is 100% repeatable on my system. You can see that the second system("date"); command fails to execute on 64 bit.

Anybody able to duplicate this problem? And more important - any solution?

Cheers, Peter

#!/usr/bin/perl system("date"); if ( $? == -1 ) { print "Level 0 command failed: $!\n"; } else { print "Level 0 command exited with value ",($? >> 8),"\n"; } for ($i = 1; $i <= 5760; $i++) { for ($j = 1; $j <= 2880; $j++) { $array1[$i][$j] = "<1234567890,1234567890,1234567890>"; $array2[$i][$j] = "<1234567890,1234567890,1234567890>"; } } system("date"); if ( $? == -1 ) { print "Level 0 command failed: $!\n"; } else { print "Level 0 command exited with value ",($? >> 8),"\n"; } print "End\n"; exit;

Bad output from Slackware 13.0 64 bit:

Tue Feb 16 23:09:22 GMT 2010 Level 0 command exited with value 0 Level 0 command exited with value 0 End

Good output from Slackware 12.2 32 bit:

Tue Feb 16 23:13:52 GMT 2010 Level 0 command exited with value 0 Tue Feb 16 23:14:13 GMT 2010 Level 0 command exited with value 0 End


In reply to system command - OK on 32 bit, fails on 64 bit Linux - why? by geep999

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.