private int runCommandLine(final Map<String, Object> options, final String[] commandLine) throws Exception { final File startLogFile = new File(workingDir, startLogFileName).getAbsoluteFile(); // see bug 32548 if (startLogFile.exists() && !startLogFile.delete()) { throw new IOException("Unable to delete start log file (" + startLogFile.getAbsolutePath() + ")!"); } Map<String, String> env = new HashMap<String, String>(); // read the passwords from command line SocketCreator.readSSLProperties(env); printCommandLine(commandLine); final int pid = OSProcess.bgexec(commandLine, workingDir, startLogFile, false, env); printStartMessage(options, pid); return pid; }
private int runCommandLine(final Map<String, Object> options, Properties props, final String[] commandLine) throws Exception { final File startLogFile = new File(workingDir, startLogFileName).getAbsoluteFile(); // see bug 32548 if (startLogFile.exists() && !startLogFile.delete()) { throw new IOException("Unable to delete start log file (" + startLogFile.getAbsolutePath() + ")!"); } final File pidFile = new File(workingDir, pidFileName).getAbsoluteFile(); // see bug 32548 if (pidFile.exists() && !pidFile.delete()) { throw new IOException("Unable to delete pid file (" + pidFile.getAbsolutePath() + ")!"); } Map<String, String> env = (Map<String, String>)options.get(ENVARGS); if (env == null) { env = new HashMap<String, String>(); } // read the passwords from command line SocketCreator.readSSLProperties(env); printCommandLine(commandLine, env); final int pid = OSProcess.bgexec(commandLine, workingDir, startLogFile, false, env); printStartMessage(options, props, pid); return pid; }
private int runCommandLine(final Map<String, Object> options, final String[] commandLine) throws IOException { // initialize the startup log starting with a fresh log file (where all startup messages are printed) final File startLogFile = IOUtils.tryGetCanonicalFileElseGetAbsoluteFile( new File(workingDirectory, startLogFileName)); if (startLogFile.exists() && !startLogFile.delete()) { throw new IOException(LocalizedStrings.AgentLauncher_UNABLE_TO_DELETE_FILE_0.toLocalizedString( startLogFile.getAbsolutePath())); } Map<String, String> env = new HashMap<String, String>(); // read the passwords from command line SocketCreator.readSSLProperties(env, true); printCommandLine(commandLine); final int pid = OSProcess.bgexec(commandLine, workingDirectory, startLogFile, false, env); System.out.println(LocalizedStrings.AgentLauncher_STARTING_JMX_AGENT_WITH_PID_0.toLocalizedString(pid)); return pid; }
private int runCommandLine(final Map<String, Object> options, final String[] commandLine) throws IOException { // initialize the startup log starting with a fresh log file (where all startup messages are printed) final File startLogFile = IOUtils.tryGetCanonicalFileElseGetAbsoluteFile( new File(workingDirectory, startLogFileName)); if (startLogFile.exists() && !startLogFile.delete()) { throw new IOException(LocalizedStrings.AgentLauncher_UNABLE_TO_DELETE_FILE_0.toLocalizedString( startLogFile.getAbsolutePath())); } Map<String, String> env = (Map<String, String>)options.get(ENVARGS); if (env == null) { env = new HashMap<String, String>(); } // read the passwords from command line SocketCreator.readSSLProperties(env, true); printCommandLine(commandLine); final int pid = OSProcess.bgexec(commandLine, workingDirectory, startLogFile, false, env); System.out.println(LocalizedStrings .AgentLauncher_STARTING_JMX_AGENT_WITH_PID_0.toLocalizedString(pid)); return pid; }
throw new GemFireIOException("Unable to delete " + logFile.getAbsolutePath()); int managerPid = OSProcess.bgexec(cmd, directory, logFile, false, env); boolean treatAsPure = (env.size() > 0) || PureJavaMode.isPure();
throw new GemFireIOException("Unable to delete " + logFile.getAbsolutePath()); int managerPid = OSProcess.bgexec(cmd, directory, logFile, false, env); boolean treatAsPure = (env.size() > 0) || PureJavaMode.isPure();