[Swift-devel] command line ssh provider...

Jonathan Monette jonmon at mcs.anl.gov
Tue Jan 17 17:12:00 CST 2012


The change to ProcessBuilder fixed this issue.

On Jan 17, 2012, at 5:08 PM, Jonathan Monette wrote:

> 
> On Jan 17, 2012, at 5:05 PM, Mihael Hategan wrote:
> 
>> On Tue, 2012-01-17 at 14:44 -0800, Mihael Hategan wrote:
>>> That seems to be a limitation of Runtime.exec(). If you don't supply and
>>> env array, the subprocess inherits the environment from the parent. If
>>> you do, it overrides it (including unsetting the unspecified variables).
>>> 
>>> Traditionally, this was the only way of starting a subprocess. Starting
>>> with 1.5, ProcessBuilder was added, which offers a solution to this
>>> problem. I will change the code to use that.
>> 
>> Though now that I think about it, this wasn't strictly necessary since
>> for the ssh-cl provider, the task environment variables shouldn't be
>> passed to the ssh subprocess (they go on the command line of the ssh
>> shell).
> What do you mean by this?  When I saw the command line of the ssh shell no environment variables are being passed.
> 
>> 
>> Anyway, I changed the code to use ProcessBuilder. This at least fixes
>> similar issues with the local provider (and also ssh-cl).
>> 
> Thanks.  I'll give it a try again to see if it allows me to set the environment variable
> 
>> Mihael
>> 
> 
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel




More information about the Swift-devel mailing list