From owner-freebsd-current@FreeBSD.ORG Tue May 1 02:28:51 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E97516A400 for ; Tue, 1 May 2007 02:28:51 +0000 (UTC) (envelope-from sean-freebsd@farley.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id DD6F713C48C for ; Tue, 1 May 2007 02:28:48 +0000 (UTC) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l4126QrF028874; Mon, 30 Apr 2007 21:06:27 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Date: Mon, 30 Apr 2007 21:04:46 -0500 (CDT) From: "Sean C. Farley" To: Andrey Chernov In-Reply-To: <20070427122634.GA32237@nagual.pp.ru> Message-ID: <20070430205747.G28846@thor.farley.org> References: <20070426195122.P37719@thor.farley.org> <20070427122634.GA32237@nagual.pp.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org Subject: Re: setenv memory leak fix (take 3) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2007 02:28:51 -0000 On Fri, 27 Apr 2007, Andrey Chernov wrote: > On Thu, Apr 26, 2007 at 08:10:29PM -0500, Sean C. Farley wrote: >> Are there any opinions on having unsetenv() return a value to match >> unsetenv() in IEEE Std 1003.1? > > There is no much options because we should conform to standards and > unsetenv() should return int therefore. I know that unsetenv() can be changed without problems since it has no return value at the moment. The others are more difficult but not impossible. I see that a mild discussion has occurred on cvs. :) Here are both scenarios with my code changes: BSD[1] (only unsetenv() is updated to return an int. Easy to change back) POSIX[2] (all *env() functions are updated to reflect POSIX) Sean 1. http://www.farley.org/freebsd/tmp/setenv-8/BSD/sysenv.c 2. http://www.farley.org/freebsd/tmp/setenv-8/POSIX/sysenv.c -- sean-freebsd@farley.org