file descriptor leak in 5.2-RC

Poul-Henning Kamp phk at phk.freebsd.dk
Sat Dec 27 12:29:19 PST 2003


In message <20031227201706.GF86308 at 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 at 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.


More information about the freebsd-current mailing list