karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject karaf git commit: Fix some minor terminal issues
Date Mon, 29 May 2017 08:33:47 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 027d720a1 -> 7d77078d0


Fix some minor terminal issues

Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/7d77078d
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/7d77078d
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/7d77078d

Branch: refs/heads/master
Commit: 7d77078d01e93c178ace6db6ded84ef4f2dfca6a
Parents: 027d720
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Mon May 29 10:32:19 2017 +0200
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Mon May 29 10:32:19 2017 +0200

----------------------------------------------------------------------
 .../org/apache/karaf/shell/impl/console/JLineTerminal.java     | 1 +
 .../src/main/java/org/apache/karaf/shell/ssh/SshAction.java    | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/7d77078d/shell/core/src/main/java/org/apache/karaf/shell/impl/console/JLineTerminal.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/JLineTerminal.java
b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/JLineTerminal.java
index 214c860..f61d0ac 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/JLineTerminal.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/JLineTerminal.java
@@ -49,6 +49,7 @@ public class JLineTerminal implements Terminal, org.jline.terminal.Terminal
{
         this.terminal = terminal;
         for (Signal signal : Signal.values()) {
             terminal.handle(signal, this::handle);
+            handlers.put(signal, SignalHandler.SIG_DFL);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/7d77078d/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/SshAction.java
----------------------------------------------------------------------
diff --git a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/SshAction.java b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/SshAction.java
index 63c1167..256bb3b 100644
--- a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/SshAction.java
+++ b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/SshAction.java
@@ -246,9 +246,9 @@ public class SshAction implements Action {
                         if (ctype != null) {
                             channel.setEnv("LC_CTYPE", ctype.toString());
                         }
-                        channel.setIn(new NoCloseInputStream(System.in));
-                        channel.setOut(new NoCloseOutputStream(System.out));
-                        channel.setErr(new NoCloseOutputStream(System.err));
+                        channel.setIn(new NoCloseInputStream(jlineTerminal.input()));
+                        channel.setOut(new NoCloseOutputStream(jlineTerminal.output()));
+                        channel.setErr(new NoCloseOutputStream(jlineTerminal.output()));
                         channel.open().verify();
                         SignalListener signalListener = signal -> {
                             try {


Mime
View raw message