hudson
Class Launcher

This hides the difference between running programs locally vs remotely.

'env' parameter

To allow important environment variables to be
copied over to the remote machine, the 'env' parameter shouldn't contain
default inherited environment variables (which often contains
machine-specific information, like PATH, TIMEZONE, etc.)

getListener

getComputer

Deprecated.since 2008-11-16. See the javadoc for why this is inherently
unreliable. If you are trying to figure out the current Computer
from within a build, use Computer.currentComputer()

If this Launcher is encapsulating an execution on a specific
Computer, return it.

Because of the way internal Hudson abstractions are set up (that is,
Launcher only needs a VirtualChannel to do its job and
isn't really required that the channel comes from an existing
Computer), this method may not always the right Computer
instance.

launch

Deprecated.as of 1.311 Use launch() and its associated builder
pattern

Launch a command with optional censoring of arguments from the listener
(Note: The censored portions will remain visible through /proc,
pargs, process explorer, etc. i.e. people logged in on the same
machine This version of the launch command just ensures that it
is not visible from a build log which is exposed via the web)

Parameters:

cmd - The command and all it's arguments.

mask - Which of the command and arguments should be masked from the
listener

env - Environment variable overrides.

out - stdout and stderr of the process will be sent to this stream.
the stream won't be closed.

launch

Deprecated.as of 1.311 Use launch() and its associated builder
pattern

Launch a command with optional censoring of arguments from the listener
(Note: The censored portions will remain visible through /proc,
pargs, process explorer, etc. i.e. people logged in on the same
machine This version of the launch command just ensures that it
is not visible from a build log which is exposed via the web)

Parameters:

cmd - The command and all it's arguments.

mask - Which of the command and arguments should be masked from the
listener

env - Environment variable overrides.

in - null if there's no input.

out - stdout and stderr of the process will be sent to this stream.
the stream won't be closed.

launch

Deprecated.as of 1.311 Use launch() and its associated builder
pattern

Launch a command with optional censoring of arguments from the listener
(Note: The censored portions will remain visible through /proc,
pargs, process explorer, etc. i.e. people logged in on the same
machine This version of the launch command just ensures that it
is not visible from a build log which is exposed via the web)

Parameters:

cmd - The command and all it's arguments.

mask - Which of the command and arguments should be masked from the
listener

env - Environment variable overrides.

out - stdout and stderr of the process will be sent to this stream.
the stream won't be closed.

launch

Deprecated.as of 1.311 Use launch() and its associated builder
pattern

Launch a command with optional censoring of arguments from the listener
(Note: The censored portions will remain visible through /proc,
pargs, process explorer, etc. i.e. people logged in on the same
machine This version of the launch command just ensures that it
is not visible from a build log which is exposed via the web)

Parameters:

cmd - The command and all it's arguments.

mask - Which of the command and arguments should be masked from the
listener

env - Environment variable overrides.

in - null if there's no input.

out - stdout and stderr of the process will be sent to this stream.
the stream won't be closed.

launch

Deprecated.as of 1.311 Use launch() and its associated builder
pattern

Launch a command with optional censoring of arguments from the listener
(Note: The censored portions will remain visible through /proc,
pargs, process explorer, etc. i.e. people logged in on the same
machine This version of the launch command just ensures that it
is not visible from a build log which is exposed via the web)

Parameters:

cmd - The command and all it's arguments.

mask - Which of the command and arguments should be masked from the
listener

env - Environment variable overrides.

in - null if there's no input.

out - stdout and stderr of the process will be sent to this stream.
the stream won't be closed.

launchChannel

Launches a specified process and connects its input/output to a
Channel, then return it.

When the returned channel is terminated, the process will be killed.

Parameters:

out - Where the stderr from the launched process will be sent.

workDir - The working directory of the new process, or null to
inherit from the current process

envVars - Environment variable overrides. In addition to what the
current process is inherited (if this is going to be launched from a
slave agent, that becomes the "current" process), these variables will be
also set.