Skip to content

Commit

Permalink
helix-term: expand upon why we need to SIGSTOP the entire process group
Browse files Browse the repository at this point in the history
Also add a link back to one of the upstream issues.
  • Loading branch information
cole-h committed Mar 9, 2023
1 parent 21ec516 commit 38f448d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,13 @@ impl Application {
// A pid of 0 sends the signal to the entire process group, allowing the user to
// regain control of their terminal if the editor was spawned under another process
// (e.g. when running `git commit`).
//
// We have to send SIGSTOP (not SIGTSTP) to the entire process group, because,
// as mentioned above, the terminal will get stuck if `helix` was spawned from
// an external process and that process waits for `helix` to complete. This may
// be an issue with signal-hook-tokio, but the author of signal-hook believes it
// could be a tokio issue instead:
// https://github.com/vorner/signal-hook/issues/132
libc::kill(0, signal::SIGSTOP)
};

Expand Down

0 comments on commit 38f448d

Please sign in to comment.