2021-11-03 17:06:07 +0100, Vincent Lefevre via austin-group-l at The Open Group:
> On 2021-10-30 14:33:04 +0100, Stephane Chazelas via austin-group-l at The 
> Open Group wrote:
> > POSIX ended up mandating that bug (mandating that system("+c")
> > should run an interactive shell for instance), because, like the
> > the Unix libc implementors, they overlooked the issue. It is
> > clearly a bug in the standard.
> 
> It doesn't mandate that system("+c") should run an interactive shell.

Yes, I agree it looks like the behaviour of sh -c +c is
unspecified.

[...]
> ksh93 and mksh run an interactive shell, but I wonder whether this
> should be regarded as a bug.
> 
> The sh utility has the following in SYNOPSIS:
> 
>   sh −c [−abCefhimnuvx] [−o option]... [+abCefhimnuvx] [+o option]...
>       command_string [command_name [argument...]]
> 
> i.e. "+c" doesn't seem to be allowed to "cancel" the "-c".
[...]

I can't see why that wouldn't be allowed as an extension.

Just like bash's

sh -c +O xpg_echo 'echo -e "\b\c"'

would be allowed as an extension (and not be required to
interpret the +O script with xpg_echo in $0 and echo -e "\b\c"
in $1).

As the -O / +O option is not among the options POSIX specifies.

-- 
Stephane

  • Re: Interpretation ... shwaresyst via austin-group-l at The Open Group
  • Re: Interpretation ... Robert Elz via austin-group-l at The Open Group
    • Re: Interpreta... Nick Stoughton via austin-group-l at The Open Group
    • Re: Interpreta... Robert Elz via austin-group-l at The Open Group
      • Re: Interp... Eric Blake via austin-group-l at The Open Group
      • Re: Interp... Robert Elz via austin-group-l at The Open Group
        • Re: In... Steffen Nurpmeso via austin-group-l at The Open Group
        • Re: In... Robert Elz via austin-group-l at The Open Group
          • Re... Stephane Chazelas via austin-group-l at The Open Group
            • ... Vincent Lefevre via austin-group-l at The Open Group
            • ... Stephane Chazelas via austin-group-l at The Open Group
            • ... Vincent Lefevre via austin-group-l at The Open Group
          • Re... Steffen Nurpmeso via austin-group-l at The Open Group
        • Re: In... Geoff Clare via austin-group-l at The Open Group
  • Re: Interpretation ... Steffen Nurpmeso via austin-group-l at The Open Group
  • Re: Interpretation ... Robert Elz via austin-group-l at The Open Group

Reply via email to