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=$?; - Roger - ----- Original Message ----- From: "Bob Showalter" <[EMAIL PROTECTED]> To: "'Alex Harris'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 01, 2002 9:50 PM Subject: RE: still not catching error > > -----Original Message----- > > From: Alex Harris [mailto:[EMAIL PROTECTED]] > > Sent: Friday, February 01, 2002 11:52 AM > > To: [EMAIL PROTECTED] > > Subject: still not catching error > > > > > > I took out the exec and placed system. But even though > > work.pl doesn't > > exist on the remote system, still getting no error. Help! > > > > if (system("rsh $plant /u1/bin/forkit '/u1/bin/work.pl'") > 0) > > { > > excep(" $!\n"); > > } > > The exit status of rsh is 0 if it was able to connect to the remote > system. It doesn't return the exit status of the command being run. > > Try this search for some suggestions on handling this issue: > > http://groups.google.com/groups?hl=en&q=rsh+exit+status > > HTH > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]