}
private int executeSyncCommand(String command, String[] args, Map<Object, Object> newEnv, int timeout)
throws MuleControllerException
{
CommandLine commandLine = new CommandLine(muleBin);
commandLine.addArgument(command);
commandLine.addArguments(args);
DefaultExecutor executor = new DefaultExecutor();
ExecuteWatchdog watchdog = new ExecuteWatchdog(timeout);
executor.setWatchdog(watchdog);
executor.setStreamHandler(new PumpStreamHandler());
return doExecution(executor, commandLine, newEnv);