From 1fd1edbeca1f9778bdffca7a3bf97515057346d8 Mon Sep 17 00:00:00 2001 From: Hyung-Gyu Ryoo Date: Tue, 6 Feb 2024 15:24:34 +0800 Subject: [PATCH] [CBRD-25208] Set java.io.tmpdir according to the CUBRID_TMP in Java SP server (#4917) (#4937) http://jira.cubrid.org/browse/CBRD-25208 Set java.io.tmpdir according to the CUBRID_TMP. If CUBRID_TMP is set, it is utilized as java.io.tmpdir, otherwise $CUBRID/tmp is used. backport of #4917 --- src/jsp/com/cubrid/jsp/Server.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/jsp/com/cubrid/jsp/Server.java b/src/jsp/com/cubrid/jsp/Server.java index 63c3857887b..20666a1d15d 100644 --- a/src/jsp/com/cubrid/jsp/Server.java +++ b/src/jsp/com/cubrid/jsp/Server.java @@ -52,6 +52,7 @@ public class Server { private static String spPath; private static String rootPath; private static String udsPath; + private static String tmpPath; private static List jvmArguments = null; @@ -86,6 +87,12 @@ private Server( loggingThread = new LoggingThread(logFilePath); loggingThread.start(); + tmpPath = System.getProperty("CUBRID_TMP"); + if (tmpPath == null) { + tmpPath = rootPath + File.separator + "tmp"; + } + System.setProperty("java.io.tmpdir", tmpPath); + if (OSValidator.IS_UNIX && port_number == -1) { final File socketFile = new File(udsPath); if (socketFile.exists()) {