Skip to content

Conversation

@da-viper
Copy link
Contributor

SIGWINCH is sent when the terminal window size changes.. Most people debugging do not want the process on this signal.

When using lldb-dap, the user may be using an integrated terminal and may resize the pane/window mulitple times when debugging. this causes the signal to be sent multiple times. It gets in the way.

The process ignores this signal by default

SIGWINCH is sent when the terminal window size changes..
Most people debugging do not want the process on this signal.

When using lldb-dap, the user may be using an integrated terminal
and may resize the pane/window mulitple times when debugging.
this causes the signal to be sent multiple times. It gets in the way.

The process ignores this signal by default
@llvmbot
Copy link
Member

llvmbot commented Oct 13, 2025

@llvm/pr-subscribers-lldb

Author: Ebuka Ezike (da-viper)

Changes

SIGWINCH is sent when the terminal window size changes.. Most people debugging do not want the process on this signal.

When using lldb-dap, the user may be using an integrated terminal and may resize the pane/window mulitple times when debugging. this causes the signal to be sent multiple times. It gets in the way.

The process ignores this signal by default


Full diff: https://github.com/llvm/llvm-project/pull/163182.diff

2 Files Affected:

  • (modified) lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp (+1-1)
  • (modified) lldb/source/Plugins/Process/Utility/LinuxSignals.cpp (+1-1)
diff --git a/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp b/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp
index 15981a2c1cb80..a8d18f774c361 100644
--- a/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp
+++ b/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp
@@ -47,7 +47,7 @@ void GDBRemoteSignals::Reset() {
   AddSignal(25,     "SIGXFSZ",      false,    true,   true,   "file size limit exceeded");
   AddSignal(26,     "SIGVTALRM",    false,    true,   true,   "virtual time alarm");
   AddSignal(27,     "SIGPROF",      false,    false,  false,  "profiling time alarm");
-  AddSignal(28,     "SIGWINCH",     false,    true,   true,   "window size changes");
+  AddSignal(28,     "SIGWINCH",     false,    false,   false,   "window size changes");
   AddSignal(29,     "SIGLOST",      false,    true,   true,   "resource lost");
   AddSignal(30,     "SIGUSR1",      false,    true,   true,   "user defined signal 1");
   AddSignal(31,     "SIGUSR2",      false,    true,   true,   "user defined signal 2");
diff --git a/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp b/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
index 5346babc18576..dbbfc6a352e02 100644
--- a/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
+++ b/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
@@ -160,7 +160,7 @@ void LinuxSignals::Reset() {
   ADD_LINUX_SIGNAL(25,     "SIGXFSZ",      false,    true,   true,   "file size limit exceeded");
   ADD_LINUX_SIGNAL(26,     "SIGVTALRM",    false,    true,   true,   "virtual time alarm");
   ADD_LINUX_SIGNAL(27,     "SIGPROF",      false,    false,  false,  "profiling time alarm");
-  ADD_LINUX_SIGNAL(28,     "SIGWINCH",     false,    true,   true,   "window size changes");
+  ADD_LINUX_SIGNAL(28,     "SIGWINCH",     false,    false,   false,   "window size changes");
   ADD_LINUX_SIGNAL(29,     "SIGIO",        false,    true,   true,   "input/output ready/Pollable event", "SIGPOLL");
   ADD_LINUX_SIGNAL(30,     "SIGPWR",       false,    true,   true,   "power failure");
   ADD_LINUX_SIGNAL(31,     "SIGSYS",       false,    true,   true,   "invalid system call");

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good default.

Copy link
Member

@bulbazord bulbazord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@bulbazord
Copy link
Member

Can you add a line in the release notes about this change? I'm sure somebody will notice this change and we should have a place to point them.

@da-viper
Copy link
Contributor Author

will do.

I also created an RFC just in case there is any reason it is off.
https://discourse.llvm.org/t/rfc-lldb-do-not-stop-the-process-on-signal-sigwinch-on-linux/88577

Copy link
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me. If it's not stopping on the BSDs or Darwin I don't see any particular reason it would stop on Linux.

In the release note, show the command to re-enable stopping for this signal.

@da-viper da-viper merged commit 097f1e7 into llvm:main Oct 15, 2025
11 checks passed
@da-viper da-viper deleted the sigwinch-default branch October 15, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants