Date: Wed, 04 Jul 2007 15:53:41 +0200 From: Michal Mertl <mime@traveller.cz> To: freebsd-current <freebsd-current@freebsd.org>, scf@freebsd.org Subject: Environment handling broken in /bin/sh with changes to {get,set,put}env() Message-ID: <1183557221.1799.16.camel@genius.i.cz>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1183557221.1799.16.camel>