nx 21.0.0-rc.1 → 21.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +11 -11
- package/src/core/graph/main.js +1 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/fork.js +15 -0
Binary file
|
package/src/tasks-runner/fork.js
CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const child_process_1 = require("child_process");
|
4
4
|
const path_1 = require("path");
|
5
5
|
const pseudo_ipc_1 = require("./pseudo-ipc");
|
6
|
+
const exit_codes_1 = require("../utils/exit-codes");
|
6
7
|
const pseudoIPCPath = process.argv[2];
|
7
8
|
const forkId = process.argv[3];
|
8
9
|
const script = (0, path_1.join)(__dirname, '../../bin/run-executor.js');
|
@@ -28,3 +29,17 @@ childProcess.on('exit', (code) => {
|
|
28
29
|
pseudoIPC.close();
|
29
30
|
process.exit(code);
|
30
31
|
});
|
32
|
+
// Terminate the child process when exiting
|
33
|
+
process.on('exit', () => {
|
34
|
+
childProcess.kill();
|
35
|
+
});
|
36
|
+
process.on('SIGINT', () => {
|
37
|
+
childProcess.kill('SIGTERM');
|
38
|
+
process.exit((0, exit_codes_1.signalToCode)('SIGINT'));
|
39
|
+
});
|
40
|
+
process.on('SIGTERM', () => {
|
41
|
+
childProcess.kill('SIGTERM');
|
42
|
+
});
|
43
|
+
process.on('SIGHUP', () => {
|
44
|
+
childProcess.kill('SIGTERM');
|
45
|
+
});
|