Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 5 Mar 2001 16:07:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 5 Mar 2001 16:07:04 -0500 Received: from balu.sch.bme.hu ([152.66.224.40]:57274 "EHLO balu.sch.bme.hu") by vger.kernel.org with ESMTP id ; Mon, 5 Mar 2001 16:06:56 -0500 Date: Mon, 5 Mar 2001 22:05:36 +0100 (MET) From: Pozsar Balazs To: Robert Read cc: Paul Flinders , Jeff Mcadams , Rik van Riel , John Kodis , "Richard B. Johnson" , linux-kernel Subject: Re: binfmt_script and ^M In-Reply-To: <20010305123907.C6400@tenchi.datarithm.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 5 Mar 2001, Robert Read wrote: > On Mon, Mar 05, 2001 at 07:58:52PM +0100, Pozsar Balazs wrote: > > > > And what does POSIX say about "#!/bin/sh\r" ? > > In other words: should the kernel look for the interpreter between the ! > > and the newline, or [the first space or newline] or the first whitespace? > > > > IMHO, the first whitespace. Which means that "#!/bin/sh\r" should invoke > > /bin/sh. (though it is junk). > > The line terminator, '\n', is what terminates the interpreter. White > space (in this case, only ' ' and '\t') is used to seperate the ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > arguments to the interpreter. The last little tiny thing that bothers me: why? Why only ' ' and '\t' _in this case_? As someone mentioned, even isspace() returns whitespace. A possible answer (that i can think of), is that those ar the whitespaces, which are in IFS (as said previously), taking out us from kernel-space into userspace. But imho we shouldn't define another set whitespace for this case, can't we just use what isspace() says? (okay, I'm not for this '\r' thingy, I just want to see the reasons.) -- Balazs Pozsar. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/