[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some minor notes on manual chapter 4 "Shell Builtin Commands"
From: |
Kerin Millar |
Subject: |
Re: Some minor notes on manual chapter 4 "Shell Builtin Commands" |
Date: |
Mon, 9 Oct 2023 20:21:10 +0100 |
On Mon, 9 Oct 2023 14:56:24 -0400
Chet Ramey <chet.ramey@case.edu> wrote:
> On 10/9/23 1:57 AM, Kerin Millar wrote:
>
> > Just to add that, while POSIX does not specify the behaviour of the exit
> > builtin where its operand "is not an unsigned decimal integer or is greater
> > than 255", it does forbid all special built-in utilities (including exit)
> > from causing an interactive shell to exit on account of an error.
>
> Again, it's a mixed bag. The ash-derived shells and mksh exit, others
Very mixed indeed.
> (bash, yash) do not. I can see not exiting if the interactive shell is
> in posix mode.
I don't mean to nitpick over a minor issue but bash does also report that a
numeric argument is "required", implying (at least, to my mind) that the
built-in requires a valid argument to be able to act at all. Should bash remain
able to exit in the interactive context, it might make sense to avoid that
particular word.
--
Kerin Millar