James Carlson writes:
> Looking at the code, it seems pretty clear that the author expects
> that 'set' doesn't change the return code value, and that the "-ne 0"
> is checking for failures out of /usr/sbin/route itself.

Ah, shoot, I'm a bonehead.  Of course it works fine.  This is just a
ksh93 bug and/or misfeature.

In /sbin/sh:

        $ set -- `/bin/false`
        $ echo $?
        255
        $ set -- `/bin/true`
        $ echo $?
        0
        $ 

In ksh88:

        $ set -- `/bin/false`
        $ echo $?
        255
        $ set -- `/bin/true`
        $ echo $?
        0
        $ 

In ksh93, it appears that this third case actually returns the
argument count rather than 0 for success.

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

Reply via email to