Skip to content

Commit

Permalink
[CBRD-25208] Set java.io.tmpdir according to the CUBRID_TMP in Java S…
Browse files Browse the repository at this point in the history
…P server (CUBRID#4917) (CUBRID#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 CUBRID#4917
  • Loading branch information
hgryoo authored Feb 6, 2024
1 parent 344d8b0 commit 1fd1edb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/jsp/com/cubrid/jsp/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> jvmArguments = null;

Expand Down Expand Up @@ -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()) {
Expand Down

0 comments on commit 1fd1edb

Please sign in to comment.