[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH OSSTEST] PDU/xenuse: Support xenuse on machine not locked by current user



On Thu, 2013-10-17 at 11:48 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH OSSTEST] PDU/xenuse: Support xenuse on 
> machine not locked by current user"):
> > On Thu, 2013-10-17 at 11:25 +0100, Ian Jackson wrote:
> > > 1. Perl dynamic scoping ("local"):
> > > 
> > >    {
> > >        local $ENV{USER} = $user;
> > >        system_checked($xenuse, "--$onoff", "$mo->{Host}{Name}");
> > >    }
> > > 
> > > IMO this is idiomatic Perl.
> > 
> > I tried this and it didn't work. I think local causes $ENV to loose its
> > magic properties.
> 
> mariner:~> perl -e '{ local $ENV{USER}="foo"; system "printenv"; }; system 
> "printenv"' | grep USER=
> USER=foo
> USER=iwj
> mariner:~>
> 
> I'm not sure what you tried...

Essentially the same thing, or so I thought.

Looks like I either buggered it up or misinterpreted the results!

Ian.




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.