From owner-freebsd-questions Tue Oct 5 21:54: 5 1999 Delivered-To: freebsd-questions@freebsd.org Received: from awfulhak.org (dynamic-94.max1-du-ws.dialnetwork.pavilion.co.uk [212.74.8.94]) by hub.freebsd.org (Postfix) with ESMTP id BE96A15702 for ; Tue, 5 Oct 1999 21:52:54 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by awfulhak.org (8.9.3/8.9.3) with ESMTP id TAA01142; Tue, 5 Oct 1999 19:12:32 +0100 (BST) (envelope-from brian@lan.awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost.lan.Awfulhak.org [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id SAA00876; Tue, 5 Oct 1999 18:28:27 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <199910051728.SAA00876@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: Tony Finch Cc: freebsd-questions@freebsd.org Subject: Re: execve and #! arguments In-reply-to: Your message of "Tue, 05 Oct 1999 10:53:21 BST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 05 Oct 1999 18:28:20 +0100 From: Brian Somers Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > The manual page says: > > An interpreter file begins with a line of the form: > > #! interpreter [arg] > > When an interpreter file is execve'd, the system actually execve's the > specified interpreter. If the optional arg is specified, it becomes the > first argument to the interpreter, and the name of the originally > execve'd file becomes the second argument; otherwise, the name of the > originally execve'd file becomes the first argument. The original argu- > ments are shifted over to become the subsequent arguments. The zeroth > argument, normally the name of the execve'd file, is left unchanged. > > but FreeBSD allows more than one arg on the #! line, and as far as I > can tell has done since before version 2.0. Other systems, including > NetBSD, Linux, Solaris, Irix, 386BSD, and 4.3BSD-Reno, implement what > the manual page says -- only one argument is passed from the #! line > to the interpreter. > > Why the difference? 'cos FreeBSD's better :-) > Tony. > -- > f.a.n.finch dot@dotat.at fanf@demon.net > Apache Software Foundation Member -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message