Skip to content
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

ctrl+c does not terminate all par-each instances #7154

Open
rgwood opened this issue Nov 17, 2022 Discussed in #7152 · 1 comment
Open

ctrl+c does not terminate all par-each instances #7154

rgwood opened this issue Nov 17, 2022 Discussed in #7152 · 1 comment
Labels
🐛 bug Something isn't working signal-cancel Problems with how executions react to signals or attempts at cancellation (CTRL-C)

Comments

@rgwood
Copy link
Contributor

rgwood commented Nov 17, 2022

Discussed in #7152

Originally posted by cmpute November 16, 2022
How do I terminate all the commands running with par-each? When I press ctrl+c, it seems that nushell only sends the signal to one of the tasks, rather than all of them.

Steps To Reproduce

With Python installed, run ..3 | par-each { python -c "import time, itertools; [(print(i), time.sleep(0.1)) for i in itertools.count()]" } and press ctrl+c. On Windows, all Python instances are terminated (as expected), but on Linux it seems like only 1 is terminated.

Nu version

key value
version 0.71.1
branch main
commit_hash 4a83bb6
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.63.0 (4b91a6ea7 2022-08-08)
rust_channel 1.63.0-x86_64-unknown-linux-gnu
cargo_version cargo 1.63.0 (fd9c4297c 2022-07-01)
pkg_version 0.71.1
build_time 2022-11-10 16:59:15 -08:00
build_rust_channel release
features database, default, trash, which, zip
installed_plugins
@rgwood rgwood changed the title ctrl+c does not terminal all par-each instances ctrl+c does not terminate all par-each instances Nov 17, 2022
@sholderbach sholderbach added the 🐛 bug Something isn't working label Nov 17, 2022
@sholderbach sholderbach added the signal-cancel Problems with how executions react to signals or attempts at cancellation (CTRL-C) label Dec 1, 2022
@Abdillah
Copy link
Contributor

Abdillah commented Aug 13, 2023

This is also the case for each right?

Since the test case can only be terminated by repeated ctrl+c.

..3 | each { python -c "import time, itertools; [(print(i), time.sleep(0.1)) for i in itertools.count()]" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working signal-cancel Problems with how executions react to signals or attempts at cancellation (CTRL-C)
Projects
None yet
Development

No branches or pull requests

3 participants