Zond: несколько фиксов
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
group = 'asys'
|
||||
version = '0.6.12-SNAPSHOT'
|
||||
version = '0.6.13-SNAPSHOT'
|
||||
|
||||
apply plugin: 'application'
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class Main {
|
||||
PipeInputStream pipeInputStream = new PipeInputStream();
|
||||
Shell.getInstance().start(System.in, commandLine -> {
|
||||
if (commandLine.equalsIgnoreCase(":exit")) {
|
||||
Shell.getInstance().getOutput().println("force exit");
|
||||
log("force exit");
|
||||
watchdog.destroyProcess();
|
||||
Shell.getInstance().shutdown();
|
||||
Main.shutdown();
|
||||
@@ -64,17 +64,11 @@ public class Main {
|
||||
}
|
||||
pipeInputStream.write(commandLine+"\r\n");
|
||||
});
|
||||
|
||||
Connector.getInstance().startReconnect();
|
||||
|
||||
int resultCode = executeProcess(args, Shell.getInstance().getOutput(), pipeInputStream);
|
||||
|
||||
System.out.println(Ansi.ansi().reset().newline()
|
||||
.fg(Color.GREEN).a("Process Finished. Code: ")
|
||||
.bold().fg(Color.WHITE).a(resultCode).reset());
|
||||
executeProcess(args, Shell.getInstance().getOutput(), pipeInputStream);
|
||||
}
|
||||
|
||||
private static int executeProcess(String[] args, PrintStream printStream, InputStream stdin) throws IOException {
|
||||
private static void executeProcess(String[] args, PrintStream printStream, InputStream stdin) throws IOException {
|
||||
String cmdLine = Arrays.stream(args).collect(Collectors.joining(" "));
|
||||
CommandLine commandLine = CommandLine.parse(cmdLine);
|
||||
DefaultExecutor executor = new DefaultExecutor();
|
||||
@@ -94,7 +88,8 @@ public class Main {
|
||||
resultCode = -1;
|
||||
}
|
||||
|
||||
return resultCode;
|
||||
watchdog = null;
|
||||
log("Process finished. Code: " + resultCode);
|
||||
}
|
||||
|
||||
private static void loadConfig() throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user