From owner-freebsd-hackers Tue Sep 1 07:14:31 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA18570 for freebsd-hackers-outgoing; Tue, 1 Sep 1998 07:14:31 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from tim.xenologics.com (tim.xenologics.com [194.77.5.24]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA18561 for ; Tue, 1 Sep 1998 07:14:27 -0700 (PDT) (envelope-from seggers@semyam.dinoco.de) Received: (from uucp@localhost) by tim.xenologics.com (8.8.5/8.8.8) with UUCP id QAA13741; Tue, 1 Sep 1998 16:06:40 +0200 (MET DST) Received: from semyam.dinoco.de (semyam.dinoco.de [127.0.0.1]) by semyam.dinoco.de (8.9.1/8.8.8) with ESMTP id KAA06341; Tue, 1 Sep 1998 10:17:49 +0200 (CEST) (envelope-from seggers@semyam.dinoco.de) Message-Id: <199809010817.KAA06341@semyam.dinoco.de> To: joelh@gnu.org cc: bright@hotjobs.com, matthew@wolfepub.com, hackers@FreeBSD.ORG, seggers@semyam.dinoco.de Subject: Re: Environment of a process In-reply-to: Your message of "Mon, 31 Aug 1998 19:08:58 CDT." <199809010008.TAA11460@detlev.UUCP> Date: Tue, 01 Sep 1998 10:17:49 +0200 From: Stefan Eggers Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > You can also use setenv, preferably between the fork and exec. (There > was recently a thread about a memory leak if this is done frequently, > tho. I don't know the details.) It was in freebsd-current where you might have seen this lately. The problem is that setenv doesn't free the memory used by the old value. Done between fork and exec it is of no importance as due to the exec the VM of the process where it leaked goes away. It then just leaks in the child process and that only lasts till exec. Stefan. -- Stefan Eggers Lu4 yao2 zhi1 ma3 li4, Max-Slevogt-Str. 1 ri4 jiu3 jian4 ren2 xin1. 51109 Koeln Federal Republic of Germany To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message