From: Robert Klemme Date: 2008-04-12T17:15:20+09:00 Subject: Re: exec with environment? On 12.04.2008 06:57, Ian Peters-campbell wrote: > I am running a Ruby script which needs to set some environment variables > and then execute non-Ruby programs through Linux and pass the modified > environment to the new processes. It doesn't look as though I can do > this with 'exec', is there a way to do this with existing Ruby > functionality? Homegrown solution would be new_env = {} unless fork ENV.clear # if needed ENV.update new_env exec... end Kind regards robert