[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Coming changes to /bin/sh
I said - in this message ...:
Date: Tue, 09 May 2017 08:03:25 +0700
| ! ! command
| should guarantee that $? is set to 0 or 1,
which was wrong, technically, it should be a syntax error (and maybe
later I will make it so in posix mode - but not until after we prohibit
!'s in other places where they make no sense at all, if ever).
But this one seems useful (and if we are going to allow 0, 1, & 2, we
may as well allow as many as the user likes, though only those 3 provide
any useful service, all others just duplicate the result from 1 or 2 !'s)
and if we are going to permit it at all, we should at least generate the
logically correct answer (as do ksh & bosh, but not bash or the FreeBSD
shell - others I tested just prohibit it, as the standard expects.)
| It is fixable (probably 20 minutes of coding, maybe just 10
The change took something between 5 & 10 mins I think, but then...
| and then some testing),
took longer, mostly because my testing started off with a totally
bogus attempt to make this happen, which didn't work, shouldn't have
worked, and what did happen was exactly what should have happened.
But it took me some time to realise that, and while I was trying to
work out what was happening (trying to find out why my new code was
not working, when it was *obviously* perfect!) I stumbled across another
unrelated bug (which at first I thought might have been the cause of my
problem), so I fixed that one first... So this wasn't all wasted effort.
When I tested correctly, it worked correctly...
| but is it worth it?
Now a moot point, it is done.
Main Index |
Thread Index |