Better signaling between processes #3511

Open
opened 2026-01-30 23:22:50 +00:00 by claunia · 0 comments
Owner

Originally created by @giggio on GitHub (Aug 21, 2019).

Originally assigned to: @bitcrazed on GitHub.

Description of the new feature/enhancement

Provide better signal passing between processes, something similar to what Linux has to offer.

(I am aware this is not perhaps the best place to start this conversation, if you can find a better home for this issue, I'll gladly move it there.)

On Linux/Unix a process can signal another process very easily, and the process receiving the signal can also, easily trap it and decide how to react. So, ctrl+c, por example, generates a SIGINT signal, and the process receiving that signal can decide how to answer to that signal. In bash, for example, it is really easy to trap those signals and respond to them. Processes can also send signals other ways, like using kill.

On Windows it is really hard to work with "signals", even with ctrl+c, and the "signals" you can send are limited. Also, during my investigations, I noticed that, by default, if a parent process gets a ctrl+c, all it's childs also will, and if the parent disables that and spawns childs, and then reenable, it is then impossible to signal the children later.

I am trying to work with a console app that takes signal, and decides which processes it will forward the signal to. It doesn't seem possible on Windows. On *NIX it would be trivial.

Proposed technical implementation details (optional)

I am aware that this team is really careful to not break legacy code, so what I propose is a new signal layer, while keeping the old one untouched. This new layer could forward signals to the old one, and also get signals from the old one, while keeping compatibility. I am not aware how to implement that in a way that does not break things.

Originally created by @giggio on GitHub (Aug 21, 2019). Originally assigned to: @bitcrazed on GitHub. # Description of the new feature/enhancement Provide better signal passing between processes, something similar to what Linux has to offer. (I am aware this is not perhaps the best place to start this conversation, if you can find a better home for this issue, I'll gladly move it there.) On Linux/Unix a process can signal another process very easily, and the process receiving the signal can also, easily trap it and decide how to react. So, <kbd>ctrl</kbd>+<kbd>c</kbd>, por example, generates a `SIGINT` signal, and the process receiving that signal can decide how to answer to that signal. In bash, for example, it is really easy to trap those signals and respond to them. Processes can also send signals other ways, like using `kill`. On Windows it is really hard to work with "signals", even with <kbd>ctrl</kbd>+<kbd>c</kbd>, and the "signals" you can send are limited. Also, during my investigations, I noticed that, by default, if a parent process gets a <kbd>ctrl</kbd>+<kbd>c</kbd>, all it's childs also will, and if the parent disables that and spawns childs, and then reenable, it is then impossible to signal the children later. I am trying to work with a console app that takes signal, and decides which processes it will forward the signal to. It doesn't seem possible on Windows. On *NIX it would be trivial. # Proposed technical implementation details (optional) I am aware that this team is really careful to not break legacy code, so what I propose is a new signal layer, while keeping the old one untouched. This new layer could forward signals to the old one, and also get signals from the old one, while keeping compatibility. I am not aware how to implement that in a way that does not break things.
claunia added the Issue-FeatureNeeds-Tag-FixResolution-Won't-Fix labels 2026-01-30 23:22:50 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3511