Re: [9fans] acme Local command on p9p

2011-02-25 Thread Russ Cox
How about reading /proc/$pid/environ (where $pid is the shell spawned for command execution) before the $pid exits and transfering all the environment variables back to the Acme's own environment? plan9port runs in more places than linux.

Re: [9fans] acme Local command on p9p

2011-02-25 Thread dexen deVries
On Friday 25 of February 2011 16:32:27 you wrote: How about reading /proc/$pid/environ (where $pid is the shell spawned for command execution) before the $pid exits and transfering all the environment variables back to the Acme's own environment? plan9port runs in more places than linux.

Re: [9fans] acme Local command on p9p

2011-02-25 Thread roger peppe
mac os for one On 25 February 2011 15:44, dexen deVries dexen.devr...@gmail.com wrote: On Friday 25 of February 2011 16:32:27 you wrote: How about reading /proc/$pid/environ (where $pid is the shell spawned for command execution) before the $pid exits and transfering all the environment

Re: [9fans] acme Local command on p9p

2011-02-25 Thread David Leimbach
Sent from my iPhone On Feb 25, 2011, at 7:44 AM, dexen deVries dexen.devr...@gmail.com wrote: On Friday 25 of February 2011 16:32:27 you wrote: How about reading /proc/$pid/environ (where $pid is the shell spawned for command execution) before the $pid exits and transfering all the

[9fans] acme Local command on p9p

2011-02-23 Thread hugo rivera
Hello, the man page for acme on p9p reads Local In the Plan 9 acme, this prefix causes a command to be run in acme'sown file name space and environment variable group. On Unix this is impossible... is there any other way to define environment variables for acme while it's running? On plan9,

Re: [9fans] acme Local command on p9p

2011-02-23 Thread Gabriel Diaz
hello probably there are a better ways, like rc maintainng a `namespace`/env fs, so it reads that fs creating the environment correspondant to that namespace when started or simmiliar, but in lunix way (and with other shells) you can use one script to launch acme that executes the arguments of

Re: [9fans] acme Local command on p9p

2011-02-23 Thread hugo rivera
That doesn't work. I think it's because the environment variables that acme sees are those that already existed when it was called, and not those created afterwards. 2011/2/23 Gabriel Diaz gd...@9grid.es: hello probably there are a better ways, like rc maintainng a `namespace`/env fs, so it

Re: [9fans] acme Local command on p9p

2011-02-23 Thread Russ Cox
Local In the Plan 9 acme, this prefix causes a command to be run in acme'sown file name space and environment variable group. On Unix this is impossible... is there any other way to define environment variables for acme while it's running? On plan9, Local var=val sets var and then all other

Re: [9fans] acme Local command on p9p

2011-02-23 Thread Gabriel Diaz
yes you will need something like Local echo $var to get the value back i guess, which indeed will make the whole thing less convenient at least. gabi On Wed, Feb 23, 2011 at 2:13 PM, hugo rivera uai...@gmail.com wrote: That doesn't work. I think it's because the environment variables that

Re: [9fans] acme Local command on p9p

2011-02-23 Thread Rob Pike
On Wed, Feb 23, 2011 at 5:32 AM, Russ Cox r...@swtch.com wrote: Local In the Plan 9 acme, this prefix causes a command to be run in acme'sown file name space and environment variable group. On Unix this is impossible... is there any other way to define environment variables for acme while

Re: [9fans] acme Local command on p9p

2011-02-23 Thread Russ Cox
I'm unsure if this conversation is about Plan 9 or plan9port, but in any case I've used Local for lots of other things on Plan 9, particularly name space manipulations.  There, I don't understand why it needs restrictions. Or are you just saying that on plan9port you need to do magic so you

Re: [9fans] acme Local command on p9p

2011-02-23 Thread dexen deVries
On Wednesday 23 of February 2011 18:09:42 Russ Cox wrote: I'm unsure if this conversation is about Plan 9 or plan9port, but in any case I've used Local for lots of other things on Plan 9, particularly name space manipulations. There, I don't understand why it needs restrictions. Or