From owner-freebsd-questions Sun Feb 9 17:46:54 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDADF37B401 for ; Sun, 9 Feb 2003 17:46:52 -0800 (PST) Received: from groggy.anc.acsalaska.net (groggy.anc.acsalaska.net [208.151.119.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9BA143F3F for ; Sun, 9 Feb 2003 17:46:50 -0800 (PST) (envelope-from abc@anchorageinternet.org) Received: from en26.groggy.anc.acsalaska.net (root@printer [192.168.0.26]) by groggy.anc.acsalaska.net (8.12.6/8.12.6) with ESMTP id h1A1kf7X038992 for ; Sun, 9 Feb 2003 16:46:41 -0900 (AKST) (envelope-from abc@anchorageinternet.org) Received: (from abc@localhost) by en26.groggy.anc.acsalaska.net (8.12.6/8.12.6) id h1A1lJoZ022354 for "freebsd-questions" ; Mon, 10 Feb 2003 01:47:19 GMT (envelope-from abc@anchorageinternet.org) Date: Mon, 10 Feb 2003 01:47:19 GMT From: abc@anchorageinternet.org Message-Id: <200302100147.h1A1lJoZ022354@en26.groggy.anc.acsalaska.net> X-Authentication-Warning: en26.groggy.anc.acsalaska.net: abc set sender to abc@anchorageinternet.org using -f Subject: Re: #!/bin/sh & execve X-Mailer: Umail v2.9.2 To: "freebsd-questions" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG minor correction/addition to previous post: instead of "infinitely recursive", i should've said that it would break things if "script" re-exec's the same file with a different interpreter. -- > #!/bin/sh > . script this won't work if "script" is going to do something before exec'ing the file itself. it will end up being infinitely recursive. and similarly for the following: > > #!/bin/sh -n script this is currently not ok > but why shouldn't it be? > #!/bin/sh > exec /bin/sh -n script > > > #!/bin/sh script 1 2 this is ok with FBSD and RH Linux, > > but not ok in a few implementations, > > but why shouldn't it be? > > #!/bin/sh > exec /bin/sh script 1 2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message