Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Oct 1998 09:10:01 -0700 (PDT)
From:      dag-erli@ifi.uio.no (Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?= )
To:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: kern/8252: popen/pclose leaks
Message-ID:  <199810101610.JAA22077@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/8252; it has been noted by GNATS.

From: dag-erli@ifi.uio.no (Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?= )
To: zerium@zerium.dyn.ml.org
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/8252: popen/pclose leaks
Date: 10 Oct 1998 18:02:59 +0200

 zerium@webindex.no writes:
 > >Severity:       critical
 > >Priority:       high
 
 Hmm, are you sure this is appropriate?
 
 > A pclose() after a popen does not free all the uses memory.
 > 
 > This is only a problem in v3.0, not in v2.2.x.
 > 
 > The RCS diff between the popen.c in v2.2 and v3.0 is null, nil, no,
 > nothing. I'm not sure if the libc function calls leaks or if it's a kernel
 > problem.
 
 The leak is related to the use of vfork(). If you replace vfork() with
 fork() in src/lib/libc/gen/popen.c the bug will disappear.
 
 I have a feeling that calling execl() in the child branch of a vfork()
 might be a pretty bad idea, since execl() calls buildargv() which uses
 realloc() extensively.
 
 DES
 -- 
 Dag-Erling Smørgrav - dag-erli@ifi.uio.no

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810101610.JAA22077>