develooper Front page | perl.beginners | Postings from February 2002

Re: still not catching error

Thread Previous
From:
Roger C Haslock
Date:
February 2, 2002 02:48
Subject:
Re: still not catching error
Message ID:
000501c1abd6$9080dd80$9a1786d9@neliac
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" <Bob_Showalter@taylorwhite.com>
To: "'Alex Harris'" <atkharris@hotmail.com>; <beginners@perl.org>
Sent: Friday, February 01, 2002 9:50 PM
Subject: RE: still not catching error


> > -----Original Message-----
> > From: Alex Harris [mailto:atkharris@hotmail.com]
> > Sent: Friday, February 01, 2002 11:52 AM
> > To: beginners@perl.org
> > 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: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
>
>
>
>


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About