diff options
| author | Thiago Kenji Okada <thiagokokada@gmail.com> | 2025-05-01 21:32:10 +0100 |
|---|---|---|
| committer | Thiago Kenji Okada <thiagokokada@gmail.com> | 2025-05-01 21:44:37 +0100 |
| commit | 61e61a59eb99affecc383f18250928c0eb76f21f (patch) | |
| tree | 5fda8542d3f41e7b2129630f69efd5f7515f4bf5 /pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch | |
| parent | 6358207c7ca11674707bee93f8656deb814165d8 (diff) | |
nixos-rebuild-ng: kill underlying remote process
`nixos-rebuild-ng` explicitly don't allocate a pseudo-TTY for SSH
because this causes lots of issues depending on the use case (for
example, multiplexing multiple SSH sessions).
Sadly not using a pseudo-TTY also cause other issues, like the fact that
using Ctrl+C (SIGINT) doesn't kill the underlying process because SSH
doesn't support it.
We can't really start using pseudo-TTY unless we want to overcomplicate
the code for parsing results (pseudo-TTY mangles the stdout/stderr
together), so we need to handle killing the underlying remote process
manually.
This is what this commit does, when we receive a `KeyboardInterrupt`
exception while calling `run_wrapper`, we will check if it is a remote
process and send a `pkill --full` with the arguments (this should ensure
that we don't kill other process, but we can't guarantee it). This
assumes the user has `procps` installed, but I think it is a safe
assumption since this seems to be a core package.
Sadly nothing we can do if the user doesn't have `procps` installed, the
good thing is that the worst that can happen is that we will silent
fail and the process will stay in background until it finishes.
Fix #403269.
Diffstat (limited to 'pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch')
0 files changed, 0 insertions, 0 deletions
