From d244df5ba1edbe863f61bf6a02aacd71a5388834 Mon Sep 17 00:00:00 2001 From: Krrisha Patel Date: Sat, 27 Jun 2026 00:11:02 -0700 Subject: [PATCH 1/2] Include real-time signals in SIGNUMS On Linux, signal numbers SIGRTMIN through SIGRTMAX (typically 34-64) are valid but have no named constants in the signal module. The existing list comprehension only collects SIG* attributes, causing signal_number() to reject real-time signals with "not a valid signal number". Extend SIGNUMS with the SIGRTMIN..SIGRTMAX range when those attributes are available. --- supervisor/datatypes.py | 2 ++ supervisor/tests/test_datatypes.py | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/supervisor/datatypes.py b/supervisor/datatypes.py index 7fa0dc2fe..8679959bc 100644 --- a/supervisor/datatypes.py +++ b/supervisor/datatypes.py @@ -404,6 +404,8 @@ def url(value): # all valid signal numbers SIGNUMS = [ getattr(signal, k) for k in dir(signal) if k.startswith('SIG') ] +if hasattr(signal, 'SIGRTMIN') and hasattr(signal, 'SIGRTMAX'): + SIGNUMS.extend(range(signal.SIGRTMIN, signal.SIGRTMAX + 1)) def signal_number(value): try: diff --git a/supervisor/tests/test_datatypes.py b/supervisor/tests/test_datatypes.py index b7f092f7c..ae34108dd 100644 --- a/supervisor/tests/test_datatypes.py +++ b/supervisor/tests/test_datatypes.py @@ -750,6 +750,18 @@ def test_raises_for_bad_name(self): expected = "value 'BADSIG' is not a valid signal name" self.assertEqual(e.args[0], expected) + @unittest.skipUnless( + hasattr(signal, 'SIGRTMIN'), 'real-time signals not available' + ) + def test_accepts_realtime_signal_number(self): + self.assertEqual(self._callFUT(signal.SIGRTMIN), signal.SIGRTMIN) + + @unittest.skipUnless( + hasattr(signal, 'SIGRTMAX'), 'real-time signals not available' + ) + def test_accepts_realtime_signal_max(self): + self.assertEqual(self._callFUT(signal.SIGRTMAX), signal.SIGRTMAX) + class AutoRestartTests(unittest.TestCase): def _callFUT(self, arg): return datatypes.auto_restart(arg) From 5cb03b0c19e6061f35735ad47d5bde8c739078cf Mon Sep 17 00:00:00 2001 From: Krrisha Patel Date: Sat, 27 Jun 2026 19:36:26 -0700 Subject: [PATCH 2/2] Add missing signal action descriptions to running.rst The signal action documentation just said "No help on signal". Replace with proper descriptions matching the four usage patterns from supervisorctl's help_signal output. --- docs/running.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/running.rst b/docs/running.rst index 4dda8e353..5e2fef833 100644 --- a/docs/running.rst +++ b/docs/running.rst @@ -318,9 +318,21 @@ restart all Restart all processes Note: restart does not reread config files. For that, see reread and update. -signal +signal - No help on signal + Signal a process + +signal :\* + + Signal all processes in a group + +signal + + Signal multiple processes or groups + +signal all + + Signal all processes start