Then that is conformance bugs in those kernels, to me, in that files of this 
type are not load images exec() is to handle that are usable with dl*(). The 
allowance is for magics differentiating formats of that nature, as I see as the 
intent, not one bypassing what the shell is supposed to determine and in the 
process making illegal what the shell description asserts is required to be 
possible. The way to get shebang processing is as I outlined by adding to set, 
not trying to take advantage of the current language of exec() being too 
permissive.

 
 
  On Mon, Apr 12, 2021 at 9:04 AM, Joerg Schilling via austin-group-l at The 
Open Group<austin-group-l@opengroup.org> wrote:   "shwaresyst via 
austin-group-l at The Open Group" <austin-group-l@opengroup.org> wrote:

> No, it's not nonsense. The definition of comment has all characters, 
> including '!', shall be ignored until newline or end-of-file being 
> conforming. Then tokenization which might discover an operator, keyword or 
> command continues. This precludes "#!" being recognized as any of those. 
> There is NO allowance for '!' being the second character as reserved for 
> implementation extensions.

#!/bad of course is a normal comment from the vew if a normal shell. 
An execption is mz old "bsh" (not bosh) on a historic UNIX without support for
#! in the kernel.

On all recent platforms, #! is just another *magic number* that is handled by 
the kernel only.

POSIX of course does not limit what magics are recognised by the kernel.

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/

  
      • Re: [Shell... Robert Elz via austin-group-l at The Open Group
        • Re: [S... shwaresyst via austin-group-l at The Open Group
          • Re... Harald van Dijk via austin-group-l at The Open Group
            • ... shwaresyst via austin-group-l at The Open Group
              • ... Harald van Dijk via austin-group-l at The Open Group
              • ... Joerg Schilling via austin-group-l at The Open Group
              • ... Chet Ramey via austin-group-l at The Open Group
            • ... Robert Elz via austin-group-l at The Open Group
          • Re... Joerg Schilling via austin-group-l at The Open Group
          • Re... Joerg Schilling via austin-group-l at The Open Group
            • ... shwaresyst via austin-group-l at The Open Group
            • ... Robert Elz via austin-group-l at The Open Group
              • ... Joerg Schilling via austin-group-l at The Open Group
              • ... Chet Ramey via austin-group-l at The Open Group
      • Re: [Shell... Robert Elz via austin-group-l at The Open Group
  • Re: [Shell Command ... Robert Elz via austin-group-l at The Open Group
  • Re: [Shell Command ... Joerg Schilling via austin-group-l at The Open Group
  • Re: [Shell Command ... David A. Wheeler via austin-group-l at The Open Group

Reply via email to