diff options
| author | Yoshiya Hinosawa <stibium121@gmail.com> | 2021-06-25 13:15:35 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-25 13:15:35 +0900 |
| commit | 606611708c4351e9f5e0e3b975f9331d95168efb (patch) | |
| tree | 38cf330854d59d9bb48d51c9edf2ae982cfe6804 /cli/tests/raw_mode_cbreak.ts | |
| parent | 66c5f41c5bd5fa08daa09f8650135000c1787829 (diff) | |
fix(runtime/signal): use op_async_unref for op_signal_poll (#11097)
Diffstat (limited to 'cli/tests/raw_mode_cbreak.ts')
| -rw-r--r-- | cli/tests/raw_mode_cbreak.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cli/tests/raw_mode_cbreak.ts b/cli/tests/raw_mode_cbreak.ts index 6506e89d7..b1c6d324b 100644 --- a/cli/tests/raw_mode_cbreak.ts +++ b/cli/tests/raw_mode_cbreak.ts @@ -5,11 +5,13 @@ const signal = Deno.signals.interrupt(); Deno.stdout.writeSync(new TextEncoder().encode("S")); -await signal; +signal.then(() => { + Deno.stdout.writeSync(new TextEncoder().encode("A")); -Deno.stdout.writeSync(new TextEncoder().encode("A")); + signal.dispose(); -signal.dispose(); + Deno.setRaw(0, false); // restores old mode. + Deno.setRaw(0, false); // Can be safely called multiple times +}); -Deno.setRaw(0, false); // restores old mode. -Deno.setRaw(0, false); // Can be safely called multiple times +setTimeout(() => {}, 10000); // Keep the program running |
