public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Re: #! incompatible -- binfmt_script.c broken?
@ 2002-12-04 19:22 Petr Vandrovec
  2002-12-04 20:00 ` H. Peter Anvin
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Petr Vandrovec @ 2002-12-04 19:22 UTC (permalink / raw)
  To: mbm; +Cc: linux-kernel

On  4 Dec 02 at 18:52, mbm@mort.demon.co.uk wrote:
> > single argument but strips trailing whitespace. NetBSD does the same as
> > Linux but passes trailing whitespace as part of the argument.
> 
> NetBSD is also broken, in that case.  Everything I ever used that
> supported #! except linux worked sensibly.  I even wrote myself
> a patch, which still applied to 2.4 fairly recently.  It's not
> perfect (has a fixed number of args to avoid allocating from the
> heap, would be easy to change), but it's functional.

Without adding support to parse " and ' it is unacceptable. I have
dozens of scripts which use argument with spaces inside... Also
all references I was able to found talks about "single optional
argument" (SCO, AIX)... Try running script containing

#! /bin/ls a b c

on your favorite system. If it will report
'/bin/ls: a b c: No such file or directory', or 
'ls: 0653-341 The file a b c does not exist', system does not split
argument on spaces. If it will talk about 'a' not found, it splits them
on spaces.

And because of I was not able to find anything in POSIX which would say
that we should do split on spaces (not that I found that we should not), 
I vote for leaving current behavior in Linux, and fixing perl manpage 
(and eventually FreeBSD, if anyone is interested) instead.
                                                    Petr Vandrovec
                                                    vandrove@vc.cvut.cz
                                                    
                                                    

^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <20021204170701.16075.58972.Mailman@lists.us.dell.com>]

end of thread, other threads:[~2002-12-10 19:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-04 19:22 [PATCH] Re: #! incompatible -- binfmt_script.c broken? Petr Vandrovec
2002-12-04 20:00 ` H. Peter Anvin
2002-12-05  2:41 ` Miles Bader
     [not found] ` <aslmtl_im_1@cesium.transmeta.com>
2002-12-06  9:02   ` Pavel Machek
2002-12-09 18:19     ` H. Peter Anvin
2002-12-09 18:26       ` Pavel Machek
2002-12-09 19:23         ` H. Peter Anvin
2002-12-09 21:49           ` Pavel Machek
2002-12-10  0:40           ` Alan Cox
2002-12-10  0:28             ` H. Peter Anvin
2002-12-10  1:11               ` Alan Cox
2002-12-10  0:36                 ` H. Peter Anvin
     [not found] <20021204170701.16075.58972.Mailman@lists.us.dell.com>
2002-12-04 18:52 ` mbm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox