Skip to content

Commit

Permalink
jsc/common/thinthin.jsc: keep temp file out of PWD
Browse files Browse the repository at this point in the history
  • Loading branch information
pipcet committed Jan 31, 2021
1 parent 6378a3a commit 18be732
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jsc/common/thinthin.jsc
Original file line number Diff line number Diff line change
Expand Up @@ -3229,11 +3229,11 @@ if (typeof(os) !== "undefined" &&
let args = CStringsAt(this.heap, argvptr);
let command = args.join(" ");
if (this.pwd !== undefined)
command = "(cd " + this.pwd + "; PWD=. " + command + ")>tmp.out";
command = "(cd " + this.pwd + "; PWD=. " + command + ")>/tmp/tmp.out";
try {
let pid = os.spawn(command);
let o = os.waitpid(pid);
let output = os.file.readFile("tmp.out", "binary");
let output = os.file.readFile("/tmp/tmp.out", "binary");
let ret = this.fds[1].write(output, 0, output.length);
return new Promise(() => {});
} catch (e) {
Expand Down

0 comments on commit 18be732

Please sign in to comment.