|
|
|
diff -uNr parallel-20180222/src/sem parallel-20180222.mod/src/sem
|
|
|
|
--- parallel-20180222/src/sem 2018-02-22 21:42:51.000000000 +0200
|
|
|
|
+++ parallel-20180222.mod/src/sem 2018-06-21 12:37:26.333395678 +0300
|
|
|
|
@@ -1137,7 +1137,7 @@
|
|
|
|
if($opt::bug) { ::die_bug("test-bug"); }
|
|
|
|
$Global::debug = $opt::D;
|
|
|
|
$Global::shell = $ENV{'PARALLEL_SHELL'} || parent_shell($$)
|
|
|
|
- || $ENV{'SHELL'} || "/bin/sh";
|
|
|
|
+ || $ENV{'SHELL'} || "@TERMUX_PREFIX@/bin/sh";
|
|
|
|
if(not which($Global::shell)) {
|
|
|
|
::error("Shell '$Global::shell' not found.");
|
|
|
|
wait_and_exit(255);
|
|
|
|
@@ -1488,11 +1488,11 @@
|
|
|
|
$Global::trim = 'n';
|
|
|
|
$Global::max_jobs_running = 0;
|
|
|
|
$Global::job_already_run = '';
|
|
|
|
- $ENV{'TMPDIR'} ||= "/tmp";
|
|
|
|
+ $ENV{'TMPDIR'} ||= "@TERMUX_PREFIX@/tmp";
|
|
|
|
if(not $ENV{HOME}) {
|
|
|
|
# $ENV{HOME} is sometimes not set if called from PHP
|
|
|
|
- ::warning("\$HOME not set. Using /tmp.");
|
|
|
|
- $ENV{HOME} = "/tmp";
|
|
|
|
+ ::warning("\$HOME not set. Using @TERMUX_HOME@.");
|
|
|
|
+ $ENV{HOME} = "@TERMUX_HOME@";
|
|
|
|
}
|
|
|
|
# no warnings to allow for undefined $XDG_*
|
|
|
|
no warnings 'uninitialized';
|
|
|
|
@@ -3411,7 +3411,7 @@
|
|
|
|
unlink $stderrname;
|
|
|
|
|
|
|
|
my $pid = ::open3($stdin_fh,$stdout_fh,$stderr_fh,
|
|
|
|
- $0,qw(--plain --shell /bin/sh --will-cite), @args);
|
|
|
|
+ $0,qw(--plain --shell @TERMUX_PREFIX@/bin/sh --will-cite), @args);
|
|
|
|
if(my $writerpid = fork()) {
|
|
|
|
close $stdin_fh;
|
|
|
|
@stdout = <$stdout_fh>;
|