From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 17:42:27 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34C2E16A420 for ; Sat, 18 Feb 2006 17:42:27 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from viefep20-int.chello.at (viefep12-int.chello.at [213.46.255.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3909743D62 for ; Sat, 18 Feb 2006 17:42:22 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep20-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20060218174220.QMLT24926.viefep20-int.chello.at@wombat.fafoe.narf.at>; Sat, 18 Feb 2006 18:42:20 +0100 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id D6DFABE7A; Sat, 18 Feb 2006 18:42:19 +0100 (CET) Date: Sat, 18 Feb 2006 18:42:19 +0100 From: Stefan Farfeleder To: joerg@britannica.bec.de Message-ID: <20060218174216.GC578@wombat.fafoe.narf.at> Mail-Followup-To: joerg@britannica.bec.de, freebsd-hackers@freebsd.org References: <20060218171718.GA73133@stud.fit.vutbr.cz> <20060218172152.GB11874@britannica.bec.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060218172152.GB11874@britannica.bec.de> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: different behaviour on fbsd and linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2006 17:42:27 -0000 On Sat, Feb 18, 2006 at 06:21:52PM +0100, joerg@britannica.bec.de wrote: > On Sat, Feb 18, 2006 at 06:17:18PM +0100, Divacky Roman wrote: > > execl("/bin/ls", NULL); > > This is wrong. You must specify arg0 != NULL (POSIX says so) and you > must NULL-terminate the *following* list. > > E.g.: > execl("/bin/ls", "/bin/ls", NULL); > is what you want to do. execl("/bin/ls", "/bin/ls", (char *)NULL); as NULL might expand to an integer 0. Stefan