From owner-freebsd-current@FreeBSD.ORG Sat Dec 27 12:29:19 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87E0216A4CE for ; Sat, 27 Dec 2003 12:29:19 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 083E343D1D for ; Sat, 27 Dec 2003 12:29:18 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.10/8.12.10) with ESMTP id hBRKTC1o006155; Sat, 27 Dec 2003 21:29:12 +0100 (CET) (envelope-from phk@phk.freebsd.dk) To: Oliver Brandmueller From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 27 Dec 2003 21:17:06 +0100." <20031227201706.GF86308@e-Gitt.NET> Date: Sat, 27 Dec 2003 21:29:12 +0100 Message-ID: <6154.1072556952@critter.freebsd.dk> cc: freebsd-current@freebsd.org Subject: Re: file descriptor leak in 5.2-RC X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 20:29:19 -0000 In message <20031227201706.GF86308@e-Gitt.NET>, Oliver Brandmueller writes: >Hi. > >On Sat, Dec 27, 2003 at 02:01:21PM +0000, Bjoern A. Zeeb wrote: >> when daemonizing you open /dev/null and dup2 it to 0,1,2 >> to detach from stdin,out,err. > >Yes, of course. But they still should not keep lying around when going >to single user and should be visible in fstat / lsof, if everything were >OK and this were just an application problem. > >I'm currently checking if I can find something in older sources of >/dev/null - although I would appreciate help in diggin' around here, I'm >just an admin, not a programmer. And by far no kernel hacker. I do not belive you will find this problem in the device driver source for /dev/null. It is somewhere above that level where the reference fails to drop. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.