Environment handling broken in /bin/sh with changes to {get,set,put}env()

From: Michal Mertl <mime_at_traveller.cz>
Date: Wed, 04 Jul 2007 15:53:41 +0200
Hello,

I have just recompiled world to find out that /bin/sh is emitting
strange warnings after the recent changes to {get,set,put}env() and sh
itself.

When the shell starts and locale variables (e.g. LANG) are set in the
environment, the warning "sh: environment corrupt; missing value for
LANG" gets printed out on the stderr.

I have tracked it down to the changes in {get,set,put}env and
src/bin/sh/var.c 1.36. I have checked (by inserting printf just before
the call) that the arguments passed to putenv() in var.c are reasonable,
yet the above mentioned warning is issued.

The shell seems to work correctly ('ls -l' shows correct date format in
different locales) even when the blocks of code with localevars() (BTW
the most cryptic function I've seen in some time) are completely
ifdef'ed out.

Michal
Received on Wed Jul 04 2007 - 11:53:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:13 UTC