Skip to content

Commit ef6f18a

Browse files
authored
Merge pull request #34 from andrewMacmurray/child-process-spawn-cleanup
Allow child process spawned via `Task.spawn` to be cleaned up
2 parents 6492e06 + 69baaa3 commit ef6f18a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Gren/Kernel/ChildProcess.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var _ChildProcess_run = function (options) {
2424
var env = options.__$environmentVariables;
2525
var shell = options.__$shell;
2626

27-
childProcess.execFile(
27+
var subProc = childProcess.execFile(
2828
options.__$program,
2929
options.__$arguments,
3030
{
@@ -86,6 +86,10 @@ var _ChildProcess_run = function (options) {
8686
}
8787
},
8888
);
89+
90+
return () => {
91+
subProc.kill();
92+
};
8993
});
9094
};
9195

0 commit comments

Comments
 (0)