From owner-freebsd-bugs Tue Jun 20 12: 0: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 386FC37BF87 for ; Tue, 20 Jun 2000 12:00:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id MAA94501; Tue, 20 Jun 2000 12:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Tue, 20 Jun 2000 12:00:01 -0700 (PDT) Message-Id: <200006201900.MAA94501@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Phil Pennock Subject: Re: misc/19406: setenv() allocates memory which is not freed by unsetenv() Reply-To: Phil Pennock Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR misc/19406; it has been noted by GNATS. From: Phil Pennock To: David Malone Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: misc/19406: setenv() allocates memory which is not freed by unsetenv() Date: Tue, 20 Jun 2000 20:51:16 +0200 On Tue 20 Jun 2000 (19:36 +0100), David Malone wrote: > On Tue, Jun 20, 2000 at 08:28:13PM +0200, Phil Pennock wrote: > > Anyone want to think how many old programs depend on some buggy aspect of the > > memory allocation involved here? > > I believe this is required by some spec (probably POSIX), and has been > discussed several times on the FreeBSD lists. I think the conclusion was > that the current implimentation was correct. See: Not sure about that. But going to and finding the Single UNIX Specification online and searching for relevant manual pages, putenv() is there whilst setenv() isn't. Sorry, their copyright prevents me posting a full URL which includes some form of session-ID. The implementation of putenv() on setenv() appears to not comply with this spec. This is what led me to find this in the first place. *sighs* -- Phil Pennock Demon Internet Nederland -- Network Operations Centre -- Systems Administrator Libertes philosophica. Sales: +31 20 422 20 00 Support: 0800 33 6666 8 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message