Skip to content

Commit

Permalink
jsc/wasm32/wasm32.jsc: fork stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
pipcet committed Feb 1, 2021
1 parent 07af839 commit ac61b18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jsc/wasm32/wasm32.jsc
Original file line number Diff line number Diff line change
Expand Up @@ -5236,8 +5236,10 @@ if (typeof(os) !== "undefined" &&
try {
let pid = os.spawn(command);
let o = os.waitpid(pid);
console.log(timestamp);
let output = os.file.readFile("/tmp/tmp.out." + timestamp, "binary");
let ret = this.fds[1].write(output, 0, output.length);
let ret = this.fds[1].write(output, 0, output.length);
this.kport.req("exit", [0]);
return new Promise(() => {});
} catch (e) {
console.log("OH NO!");
Expand All @@ -5247,7 +5249,6 @@ if (typeof(os) !== "undefined" &&
};
ThinThin.wait4 = function(pid, wstatusp, options, rusage)
{
return pid; // XXX, in the fork-exec-wait4 case this works okay.
var ret = this.kport.req("wait4");

if (wstatusp)
Expand Down

0 comments on commit ac61b18

Please sign in to comment.