"shwaresyst via austin-group-l at The Open Group" 
<austin-group-l@opengroup.org> wrote:

> 
> I agree more clarification is desirable. The reason I see as why the function 
> isn't executed is it may be treating it as an invoke of "sh -c ls", because 
> ls is a function, but this new sh does not inherit that definition so it 
> looks on path instead and finds the utility.
> On Wednesday, December 9, 2020 Thorsten Glaser via austin-group-l at The Open 
> Group <austin-group-l@opengroup.org; miros-m...@mirbsd.org> wrote:
> Hi *,

Hi,

here is where the original mail ended for me. Interesting that you did get
more content. Is there any idea, why I received only the first line from the
original mail?

...
 
> I???ve got a report in IRC by a user who spotted a cross-shell difference.
> 
> In my opinion, the invocation???
> 
>     sh -c 'ls() { echo meow; }; exec ls'
> 
> ??? is supposed to output "meow\n and return to the caller with a zero
> errorlevel.
> 
> Some shells execve() the ls(1) binary instead.

Thorsten,

do you know any shell besides mksh and zsh that call the function with this 
command? 

>From my understanding, calling the function is a bug.

Important for me is that the Bourne Shell, ksh88 and ksh93 call ls(1), so this 
is historically correct and it was not seen as a problem by David Korn.

Jörg

-- 
EMail:jo...@schily.net                  Jörg Schilling D-13353 Berlin
                                        Blog: http://schily.blogspot.com/
URL:  http://cdrecord.org/private/ 
http://sourceforge.net/projects/schilytools/files/

  • clarification needed... Thorsten Glaser via austin-group-l at The Open Group
    • RE: clarificati... shwaresyst via austin-group-l at The Open Group
      • Re: clarifi... Joerg Schilling via austin-group-l at The Open Group
        • Re: cla... Thorsten Glaser via austin-group-l at The Open Group
          • Re:... Joerg Schilling via austin-group-l at The Open Group
          • Re:... Steffen Nurpmeso via austin-group-l at The Open Group
        • Re: cla... Steffen Nurpmeso via austin-group-l at The Open Group
          • Re:... Joerg Schilling via austin-group-l at The Open Group
            • ... Thorsten Glaser via austin-group-l at The Open Group
              • ... Steffen Nurpmeso via austin-group-l at The Open Group
            • ... Steffen Nurpmeso via austin-group-l at The Open Group
              • ... Steffen Nurpmeso via austin-group-l at The Open Group
              • ... Geoff Clare via austin-group-l at The Open Group

Reply via email to