Skip to content

Commit

Permalink
jsc/wasm32/wasm32.jsc: minor fix, dedebugging
Browse files Browse the repository at this point in the history
  • Loading branch information
pipcet committed Feb 2, 2021
1 parent 4cd8137 commit 2d06cf3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jsc/wasm32/wasm32.jsc
Original file line number Diff line number Diff line change
Expand Up @@ -4920,6 +4920,9 @@ if (typeof(os) !== "undefined" &&
ThinThin.newfstatat = function (fdno, pathstr, statbufptr, flags) {
var dd = this.fds[fdno] || this.process.ddroot;
var path = CStringAt(this.HEAPU8, pathstr);
if (path === "" && (flags & %{AT_EMPTY_PATH})) {
return ThinThin.fstat.call(this, fdno, statbufptr);
}
if (this.pwd && path[0] !== "/")
path = this.pwd + "/" + path;

Expand All @@ -4932,9 +4935,6 @@ if (typeof(os) !== "undefined" &&
%{statbufptr[&stat::st_blocks] = "1"}
return 0;
}
if (path === "" && (flags & %{AT_EMPTY_PATH})) {
return ThinThin.fstat.call(this, fdno, statbufptr);
}

if (!dd)
return -%{EBADF};
Expand Down Expand Up @@ -5242,7 +5242,7 @@ if (typeof(os) !== "undefined" &&
let command = args.join(" ");
let timestamp = Date.now();
if (this.pwd !== undefined)
command = "(cd " + this.pwd + "; PWD=. " + command + ")|tee /tmp/tmp.out." + timestamp;
command = "(cd " + this.pwd + "; PWD=. " + command + ")>/tmp/tmp.out." + timestamp;
command = command.replace("sh -c ", "");
try {
let pid = os.spawn(command);
Expand Down

0 comments on commit 2d06cf3

Please sign in to comment.