-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send SIGINT rather than SIGTERM #452
Conversation
While SIGTERM may be the "correct" choice from a documentation standpoint, SIGINT is more widely used. Most applications are designed to run in a terminal and most (all?) send SIGINT when issuing ^C. This PR simulates this behavior from atom-build.
👍 wonderful. This probably fixes the issue that sometimes the running application isn't terminated if a new build is triggered before the old one finishes |
I hope so. Looks like with |
Perhaps a target config setting could be added to continue using |
@Gawdl3y perhaps if there ever arose a need for it. I highly doubt it though. To send |
What might make sense is to progress this way for each press of Escape: |
What would you do then in case the build is restarted before the previous one is finished? |
You can't. |
Build will now start of by sending SIGINT (similar to what many terminals do). If the process hasn't terminated, it will send SIGTERM on the next press. Finally SIGKILL is issued which guarantees process termination. The same is true if issuing a new build while another build is running.
I tried to grok the code. But my javascript-closure-foo is not strong enough. The idea seems fine to me, even though it'll mean my regular use case will be ESC + ESC + F6. |
That's a good point. For a lot of people I'd assume. Now I'm thinking I
|
I made it configurable on the build command. I think that makes sense, since commands may have different needs, so a global configuration might not cut it. |
Awesome! Can it only be set from js or are the names strings? |
Your solution definitely gets a 👍 from me. |
Works with any format. Build providers can also set it
|
While SIGTERM may be the "correct" choice from a documentation
standpoint, SIGINT is more widely used. Most applications are
designed to run in a terminal and most (all?) send SIGINT
when issuing ^C.
This PR simulates this behavior from atom-build.