fix: forward kill signals from pixi to deno task shell commands#3837
fix: forward kill signals from pixi to deno task shell commands#3837wolfv wants to merge 3 commits intoprefix-dev:mainfrom
Conversation
baszalmstra
left a comment
There was a problem hiding this comment.
If this works that would be great! Lets test it throughly!
| // fn reset_cursor() { | ||
| // let term = console::Term::stdout(); | ||
| // let _ = term.show_cursor(); | ||
| // } |
There was a problem hiding this comment.
Isnt this still an issue?
| @@ -0,0 +1,257 @@ | |||
| // Copyright 2018-2025 the Deno authors. MIT license. | |||
| UnsupportedPlatformError(#[from] UnsupportedPlatformError), | ||
| } | ||
|
|
||
| /// Runs a deno task future forwarding any signals received |
|
|
||
| // Handle CTRL-C ourselves again | ||
| ctrlc_should_exit_process.store(true, Ordering::Relaxed); | ||
| // ctrlc_should_exit_process.store(true, Ordering::Relaxed); |
There was a problem hiding this comment.
Please remove commented code.
|
Using the example in the issue this doesn't allow me to correctly stop the pixi process anymore. import signal
import time
def signal_handler(signum, frame):
print(f"Signal handler called with signal {signum}")
signal.signal(signal.SIGINT, signal_handler)
while True:
time.sleep(1)This will run indefinitely without me being able to stop it. While the old pixi allows me to send If I add While the latest release gives me: |
|
Thanks for trying. Indeed, I also added |
|
When I run this, I get: |
|
The problem for me is that I can't properly quit it when the signal is ignored by the running executable. Pixi just sends it through and doesn't stop. |
|
superseded by gh-4243 |
We had some logic that ignored CTRL+C on the pixi level. However, my understanding is that it only made CTRL+C "transparent" so that it reached the right process underneath, but didn't properly set up forwarding for CTRL+C and other signals.
By using the
KillSignalfromdeno_task_shellwe can properly forward any signal received inpixito the child processes.Should fix #3789
TODO: