From owner-freebsd-bugs Sat Oct 10 08:30:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA17829 for freebsd-bugs-outgoing; Sat, 10 Oct 1998 08:30:22 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA17744 for ; Sat, 10 Oct 1998 08:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id IAA20669; Sat, 10 Oct 1998 08:30:00 -0700 (PDT) Date: Sat, 10 Oct 1998 08:30:00 -0700 (PDT) Message-Id: <199810101530.IAA20669@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: Bruce Evans Subject: Re: kern/8252: popen/pclose leaks Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/8252; it has been noted by GNATS. From: Bruce Evans To: FreeBSD-gnats-submit@FreeBSD.ORG, zerium@webindex.no Cc: Subject: Re: kern/8252: popen/pclose leaks Date: Sun, 11 Oct 1998 01:22:31 +1000 >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. execl() leaks if vfork() is actually vfork(). Global data should not be changed between vfork() and execve(), but execl() calls malloc(). The simple fix (a tiny pessimization) is to replace vfork() by fork() in popen(). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message