From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: mbm@mort.demon.co.uk
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Re: #! incompatible -- binfmt_script.c broken?
Date: Wed, 4 Dec 2002 20:22:46 +0100 [thread overview]
Message-ID: <9633612287A@vcnet.vc.cvut.cz> (raw)
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
next reply other threads:[~2002-12-04 19:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-04 19:22 Petr Vandrovec [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9633612287A@vcnet.vc.cvut.cz \
--to=vandrove@vc.cvut.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mbm@mort.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome