Subject: Re: building 3.0 in the background can "freeze" due to unsafe use of ksh
To: None <netbsd-users@netbsd.org>
From: Greg A. Woods <woods@planix.com>
List: netbsd-users
Date: 05/03/2006 23:02:33
--pgp-sign-Multipart_Wed_May__3_23:02:30_2006-1
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
At Wed, 03 May 2006 15:29:12 -0400,
Me-planix.com wrote:
>=20
> Building of 3.0 in the background (with nohup) can "freeze" with a stuck
> configure script due to what appears to be unsafe use of ksh (i.e. when
> $ENV is not cleared and thus all manner of things can get buggered).
Taking a page from my software hygiene practices for pkgsrc (*) I
decided to work around this problem by fixing my build.sh wrapper script
to do this before it does anything else:
if [ -z "$MYBUILD_CLEAN" ]; then
exec env -i USER=3D${USER} SHELL=3D/bin/ksh MYBUILD_CLEAN=3Dtrue "$0" ${1+=
"$@"}
fi
(fyi, my wrapper needs $USER internally to create the build directory
names as I like them)
This begs the question why build.sh doesn't do this itself (using the
shell it was invoked with somehow maybe).
(*) I've been using this patch (and precursors like it) in pkgsrc for a
very long time now:
-TOOLS_PLATFORM.env?=3D /usr/bin/env
+TOOLS_PLATFORM.env?=3D /usr/bin/env -i
It fixes all sorts of weird problems that you never knew you had before!
--=20
Greg A. Woods
H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com> Secrets of the Weird <woods@weird.com>
--pgp-sign-Multipart_Wed_May__3_23:02:30_2006-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: P0B8gRMQpEQi3kWguPBCMdcbs1GxfOzg
iQA/AwUBRFluyGZ9cbd4v/R/EQK1dgCfYQeLN28RnppFTVAQ0fk2w0cODfYAn1/N
+2zPSneAJkVqnjU++i/EZghQ
=7Y3p
-----END PGP SIGNATURE-----
--pgp-sign-Multipart_Wed_May__3_23:02:30_2006-1--