Skip to content

Commit

Permalink
fix(sandbox): properly redirect stdout (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
manast authored May 5, 2021
1 parent 6bdacb8 commit c8642a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/classes/child-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,17 @@ export class ChildPool {
await stat(masterFile);
}

child = fork(masterFile, [], { execArgv });
child = fork(masterFile, [], { execArgv, stdio: 'pipe' });
child.processFile = processFile;

_this.retained[child.pid] = child;

child.on('exit', _this.remove.bind(_this, child));

child.stdout.on('data', function(data) {
console.log(data.toString());
});

await initChild(child, child.processFile);
return child;
}
Expand Down

0 comments on commit c8642a0

Please sign in to comment.