On Wed, Aug 05, 2009 at 08:57:53AM +0200, Petr Rockai wrote:
> [email protected] (Trent W. Buck) writes:
> 
> > Another thing I sometimes do to test a command "foo" is
> >
> >     env -i >/dev/null 2>&1 </dev/null foo
> >
> > which ought to remove tty-ness as well as all environment variables
> > (e.g. $HOME and $TERM).  Sticking a "sudo -u nobody" in front also
> > occurs to me, since sometimes programs use nss to expand ~ instead of
> > honouring $HOME...
> sudo -u won't reset HOME if that's what you mean (throw in -H).

That's why env -i.  The sudo -u is meant to "fix" geteuid(3), and thus
the approach of doing a getent passwd on $EUID to find out where $HOME
is when $HOME is unset.

Anyways, I've drifted completely offtopic by this point.

> Moreover, buildbot usually uses PTYs to let programs run in a
> virtual TTY.

Ew.
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to