[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Environment handling broken in /bin/sh with changes to t,set,put}env()
- To: "Sean C. Farley" <scf_(_at_)_FreeBSD_(_dot_)_org>
- Subject: Re: Environment handling broken in /bin/sh with changes to t,set,put}env()
- From: Andrey Chernov <ache_(_at_)_nagual_(_dot_)_pp_(_dot_)_ru>
- Date: Sat, 14 Jul 2007 02:40:53 +0400
- Cc: freebsd-current <freebsd-current_(_at_)_FreeBSD_(_dot_)_org>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nagual.pp.ru; s=default; t=1184366454; bh=lFTc1ju+KhrORT0bPjN5kehAEP7bS5lxYck4UtX mccc=; l=776; h=Received:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:User-Agent; b=KLAznw9OOgJtULdZsUWn TtQ+7pb7mFkp87DGfmnCsJoTeJMfoayEn37hgX4wALc/pT2A5xIFIwC+c94sykEQQBl lc8CMsjAELpJ5V8/o4KSiU+EuyAYHa0gqBLi56vdH3Gbl+qtGbkYA9gc+ud/zobQ1Y4 ntr2IjbLwZI9yjTQw=
- Mail-followup-to: Andrey Chernov <ache_(_at_)_nagual_(_dot_)_pp_(_dot_)_ru>, "Sean C. Farley" <scf_(_at_)_FreeBSD_(_dot_)_org>, freebsd-current <freebsd-current_(_at_)_FreeBSD_(_dot_)_org>
On Fri, Jul 13, 2007 at 05:15:37PM -0500, Sean C. Farley wrote:
> Well technically, for setenv() and unsetenv() (the Open Group):
>
> If the application modifies environ or the pointers to which it
> points, the behavior of unsetenv() is undefined.
>
> However, I would like to have *env() functions work in this case.
It seems that anybody will agree with that.
> I chose #3. Try the patch[1] again. It creates a setenv() function
> which is a wrapper around __setenv(). __setenv() takes the lengths of
> name and value to allow the caller to calculate the length using pointer
> arithmetic instead of strlen().
>
> Sean
> 1. http://www.farley.org/freebsd/tmp/setenv/clearenv/patch
The wrapper version finally looks OK for me.
--
http://ache.pp.ru/
_______________________________________________
freebsd-current_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe_(_at_)_freebsd_(_dot_)_org"
- References:
- Re: Environment handling broken in /bin/sh with changes to {get,set,put}env()
- Re: Environment handling broken in /bin/sh with changes to {get,set,put}env()
- Re: Environment handling broken in /bin/sh with changes to {get,set,put}env()
- Re: Environment handling broken in /bin/sh with changes to {get,set,put}env()
- Re: Environment handling broken in /bin/sh with changes to {get,set,put}env()
- Re: Environment handling broken in /bin/sh with changes to {get,set,put}env()
- Re: Environment handling broken in /bin/sh with changes to {get,set,put}env()
- Re: Environment handling broken in /bin/sh with changes to {get,set,put}env()
- Re: Environment handling broken in /bin/sh with changes to {get,set,put}env()
- Re: Environment handling broken in /bin/sh with changes to t,set,put}env()
Visit your host, monkey.org