| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7c79ba7 commit 4fe5c4e
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,8 +5,6 @@ prefix parallel | |||
| 5 | 5 | # sample-test : PASS,FLAKY | |
| 6 | 6 | ||
| 7 | 7 | [true] # This section applies to all platforms | |
| 8 | - # https://github.com/nodejs/node/issues/41123 | ||
| 9 | - test-repl-sigint-nested-eval: PASS, FLAKY | ||
| 10 | 8 | # https://github.com/nodejs/node/issues/43084 | |
| 11 | 9 | test-worker-http2-stream-terminate: PASS, FLAKY | |
| 12 | 10 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,9 +10,8 @@ if (!common.isMainThread) | |||
| 10 | 10 | const assert = require('assert'); | |
| 11 | 11 | const spawn = require('child_process').spawn; | |
| 12 | 12 | ||
| 13 | - process.env.REPL_TEST_PPID = process.pid; | ||
| 14 | 13 | const child = spawn(process.execPath, [ '-i' ], { | |
| 15 | - stdio: [null, null, 2] | ||
| 14 | + stdio: [null, null, 2, 'ipc'] | ||
| 16 | 15 | }); | |
| 17 | 16 | ||
| 18 | 17 | let stdout = ''; | |
@@ -22,17 +21,19 @@ child.stdout.on('data', function(c) { | |||
| 22 | 21 | }); | |
| 23 | 22 | ||
| 24 | 23 | child.stdout.once('data', common.mustCall(() => { | |
| 25 | - process.on('SIGUSR2', common.mustCall(() => { | ||
| 24 | + child.on('message', common.mustCall((msg) => { | ||
| 25 | + assert.strictEqual(msg, 'repl is busy'); | ||
| 26 | 26 | process.kill(child.pid, 'SIGINT'); | |
| 27 | 27 | child.stdout.once('data', common.mustCall(() => { | |
| 28 | 28 | // Make sure REPL still works. | |
| 29 | 29 | child.stdin.end('"foobar"\n'); | |
| 30 | 30 | })); | |
| 31 | 31 | })); | |
| 32 | 32 | ||
| 33 | - child.stdin.write('process.kill(+process.env.REPL_TEST_PPID, "SIGUSR2");' + | ||
| 34 | - 'vm.runInThisContext("while(true){}", ' + | ||
| 35 | - '{ breakOnSigint: true });\n'); | ||
| 33 | + child.stdin.write( | ||
| 34 | + 'vm.runInThisContext("process.send(\'repl is busy\'); while(true){}", ' + | ||
| 35 | + '{ breakOnSigint: true });\n' | ||
| 36 | + ); | ||
| 36 | 37 | })); | |
| 37 | 38 | ||
| 38 | 39 | child.on('close', function(code) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments