abstractdog commented on code in PR #5838:
URL: https://github.com/apache/hive/pull/5838#discussion_r2207311772


##########
beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java:
##########
@@ -152,11 +153,17 @@ public String get(String envVar) {
 
   public BeeLineOpts(BeeLine beeLine, Properties props) {
     this.beeLine = beeLine;
-    if (terminal.getWidth() > 0) {
-      maxWidth = terminal.getWidth();
-    }
-    if (terminal.getHeight() > 0) {
-      maxHeight = terminal.getHeight();
+    try {
+      Terminal terminal = TerminalBuilder.terminal();
+      if (terminal.getWidth() > 0) {
+        maxWidth = terminal.getWidth();
+      }
+      if (terminal.getHeight() > 0) {
+        maxHeight = terminal.getHeight();
+      }
+      terminal.close();

Review Comment:
   right, it wasn't really handled, I'll take care of closing the terminals 
since they might use native resources



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to