From f216673f982fed03dcb2361ba64d86857f181ca9 Mon Sep 17 00:00:00 2001
From: Luke Parker <10430890+Hona@users.noreply.github.com>
Date: Sat, 15 Nov 2025 08:05:47 +1000
Subject: [PATCH] fix: Add missing SIGWINCH for windows (#24704)
### What does this PR do?
Fixes https://github.com/oven-sh/bun/issues/22288
Fixes #22402
Fixes https://github.com/oven-sh/bun/issues/23224
Fixes https://github.com/oven-sh/bun/issues/17803
cc: Should unblock opencode/opentui window resize on windows
https://github.com/sst/opentui/issues/152
### How did you verify your code works?
Clone the linked repro, verified latest bun failed, node worked, then
iterated till my local bun worked.
Here is a screenshot of the branch working with bun on windows
Additionally using bun vs bun-debug on a little test for our downstream
package proves this works
---
src/bun.js/bindings/BunProcess.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/bun.js/bindings/BunProcess.cpp b/src/bun.js/bindings/BunProcess.cpp
index e38ddf3b22..d079964114 100644
--- a/src/bun.js/bindings/BunProcess.cpp
+++ b/src/bun.js/bindings/BunProcess.cpp
@@ -962,6 +962,7 @@ static void loadSignalNumberMap()
signalNameToNumberMap->add(signalNames[2], SIGQUIT);
signalNameToNumberMap->add(signalNames[9], SIGKILL);
signalNameToNumberMap->add(signalNames[15], SIGTERM);
+ signalNameToNumberMap->add(signalNames[27], SIGWINCH);
#else
signalNameToNumberMap->add(signalNames[0], SIGHUP);
signalNameToNumberMap->add(signalNames[1], SIGINT);