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

Mihael Hategan hategan at mcs.anl.gov
Tue Jan 17 17:05:46 CST 2012


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).

Anyway, I changed the code to use ProcessBuilder. This at least fixes
similar issues with the local provider (and also ssh-cl).

Mihael




More information about the Swift-devel mailing list