Re: exit status



"Jerry Adair" <jerry.adair@xxxxxxx> wrote:
Paul-

Not sure why I am getting the flack from you, but whatever.

His flack was self-documenting. And now we can odd top-posting to
the flack.

Anyway, I have read the documentation and know about the return value
from wait, etc. To answer the other questions I have been asked, I am
using system() calls to invoke the script.

inside script "1":
my $exitStatus = system( "<call to script #2>" );
print( STDOUT "exit=$exitStatus\n" );

inside script "2": (similar code)
my $return = system( "<call to a program>" );
print( STDOUT "return=$return\n" );
exit( $return >> 8 );

And the output from script "2" gives the number 2,

That is strange. The output of script 2 should give a zero, or a number
greater than 255. But anyway, if it actually is 2, then 2>>8 is zero, so
script 2 itself is exiting with zero. That would certainly explain the
result, no?




I hope this helps. Any more flack and I think I'll punt and seek help
elsewhere.

No skin off of my nose, certainly.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
.



Relevant Pages

  • Re: AIX 5.3 disaster recovery fro AIX newbie
    ... >are you in the server in maint mode? ... I know just because I cannot get in and examined the script it ran. ... one of the scripts smoked /etc/passwd file, to zero. ... If you are not the intended recipient ...
    (AIX-L)
  • Re: Why must I chomp a variable set in a script?
    ... If they are of zero size, ... it is supposed to trigger the email program to notify the users. ... have to "chomp" the variable to get this to work? ... like the value was supplied from the command line, it is set in the script. ...
    (perl.beginners)
  • Re: problem with a file processing script
    ... but I am far from a script writer, and I recently run into a little ... if the file I am looking for is zero ... the $NEWNUM it's because the extension the third party software is ... print that $EQFILE existed but was empty ...
    (comp.unix.shell)
  • Re: problem with a file processing script
    ... but I am far from a script writer, and I recently run into a little ... if the file I am looking for is zero ... the $NEWNUM it's because the extension the third party software is ... print that $EQFILE existed but was empty ...
    (comp.unix.shell)
  • Re: converting file to excel problem
    ... Shawn wrote: ... > We are using the below script to convert a file into excel format. ... > problem is that my file contains ssn in which they can start with zero. ...
    (comp.lang.perl.misc)