system call exit status

C. Abney cabney at cyberpass.net
Thu Jun 1 20:59:50 CDT 2000


~sdpm~
On Thu, 1 Jun 2000, C. Abney wrote:
> On Thu, 1 Jun 2000, Bobby Kleemann wrote:
> > DIAGNOSTICS
> >      The exit status (or error level) approximates the exit codes
> >      defined  by PKWARE and takes on the following values, except
> >      under VMS:
> 
> maybe a 'perldoc -f system' while you are about it???  That 1st example
> given is revealing.

Say, wasn't there some kind of explanation about this regarding underlying
philosophy behind error messages?  'Pessimal' is maximally bad, but in 
language parlance the error messages generated can be optimal or pessimal
in the sense of which result conveys the richest depth of meaning.

Most shells follow 'C's lead and choose the pessimal route, conveying the
complexity of failure:  You can fail in innumerable ways and somewhere is
a key to gaining information about the numerical value of your failure. A
simple zero (0) as a return value indicates 'no known failure'.

Perl breaks tradition with this: zero (0) indicates 'no result'.  But lets
you succeed with the standard one (1), or with REF, HASH, ARRAY, SCALAR,
etc. as a return value.  Some operations will even fail (in a way) with
a negative (-1) return value.

Therefore it can be a point of confusion for the new Perler, doing a 
system call (to the shell!) returns a pessimal value in an optimal 
environment. (oh, that wouldn't be my bias showing, not at all...)

CA
-- 
Einstein himself said that God doesn't roll dice. But he was wrong. And
in fact, anyone who has played role-playing games knows that God
probably had to roll quite a few dice to come up with a character like
Einstein.  -- Larry Wall                                     C. Abney

~sdpm~

The posting address is: san-diego-pm-list at hfb.pm.org

List requests should be sent to: majordomo at hfb.pm.org

If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at happyfunball.pm.org> with the following
command in the body of your email message:

    unsubscribe san-diego-pm-list

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at happyfunball.pm.org> .
This is the general rule for most mailing lists when you need
to contact a human.




More information about the San-Diego-pm mailing list