1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 04:52:26 -05:00

Compare commits

...

3 commits

Author SHA1 Message Date
Divy Srivastava
c7cc58aa31
Merge 1f04d843dd into 9aa02769c8 2025-01-19 23:35:16 +04:00
Divy Srivastava
1f04d843dd
Merge branch 'main' into sigwinch_stdio 2025-01-14 22:37:15 +05:30
Divy Srivastava
4f4c2a0696 fix(ext/node): emit resize event on SIGWINCH
```
process.stdout.on("resize", () => {
  console.log("resize");
});
```
2024-12-14 18:39:28 +05:30

View file

@ -964,6 +964,11 @@ internals.__bootstrapNodeProcess = function (
"stdout",
);
}
if (stdout.isTTY) {
Deno.addSignalListener("SIGWINCH", () => {
stdout.emit("resize");
});
}
if (!io.stderr.isTerminal()) {
/** https://nodejs.org/api/process.html#process_process_stderr */
@ -972,6 +977,11 @@ internals.__bootstrapNodeProcess = function (
"stderr",
);
}
if (stderr.isTTY) {
Deno.addSignalListener("SIGWINCH", () => {
stderr.emit("resize");
});
}
arch = arch_();
platform = isWindows ? "win32" : Deno.build.os;