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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to