> -----Original Message-----
> From: Roger C Haslock [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 02, 2002 5:43 AM
> To: Bob Showalter; 'Alex Harris'; [EMAIL PROTECTED]
> Subject: Re: still not catching error
> 
> 
> You are testing the exit status of the system call, not the 
> exit status of
> the rsh call which is in $?.
> You need
> 
> $systemstatus=system(...);
> $rshstatus=$?;

>From the docs for system():

   ...The return value is the exit status of the program
   as returned by the "wait" call.  To get the actual
   exit value divide by 256.

So he *is* testing the rsh exit status (at least 0 vs non-zero). 
The problem is that rsh does not return the exit status of the 
command it is running, which is what the OP is trying to check. 
$? will not help him with that.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to