From 32e7dcc9dd2f34d51fc894933eecfcd3539ebc07 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 15 May 2017 23:40:55 +0200 Subject: [PATCH] Export TMPDIR to $PREFIX/tmp Fixes https://github.com/termux/termux-packages/issues/1010. Fixes https://github.com/termux/termux-app/issues/306. --- app/src/main/java/com/termux/app/BackgroundJob.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/termux/app/BackgroundJob.java b/app/src/main/java/com/termux/app/BackgroundJob.java index bd76edc2fd..1ff2450eb4 100644 --- a/app/src/main/java/com/termux/app/BackgroundJob.java +++ b/app/src/main/java/com/termux/app/BackgroundJob.java @@ -116,8 +116,9 @@ public static String[] buildEnvironment(boolean failSafe, String cwd) { final String langEnv = "LANG=en_US.UTF-8"; final String pathEnv = "PATH=" + TermuxService.PREFIX_PATH + "/bin:" + TermuxService.PREFIX_PATH + "/bin/applets"; final String pwdEnv = "PWD=" + cwd; + final String tmpdirEnv = "TMPDIR=" + TermuxService.PREFIX_PATH + "/tmp"; - return new String[]{termEnv, homeEnv, prefixEnv, ps1Env, ldEnv, langEnv, pathEnv, pwdEnv, androidRootEnv, androidDataEnv, externalStorageEnv}; + return new String[]{termEnv, homeEnv, prefixEnv, ps1Env, ldEnv, langEnv, pathEnv, pwdEnv, androidRootEnv, androidDataEnv, externalStorageEnv, tmpdirEnv}; } }