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

Child process of "gum spin" keeps running after ctrl-c if output is redirected #690

Open
ctn-malone opened this issue Oct 18, 2024 · 0 comments

Comments

@ctn-malone
Copy link

ctn-malone commented Oct 18, 2024

Describe the bug

When killing gum spin -- xxx with ctrl-c, child process keeps running if stdout is redirected

To Reproduce

  • ping process will be killed when doing ctrl-c
gum spin --show-output -- ping -c 20 www.google.com
  • ping process will keep running when doing ctrl-c
gum spin --show-output -- ping -c 20 www.google.com >/tmp/log

Expected behavior

Child process should be killed when doing ctrl-c

Context

We have a QuickJS wrapper which relied on a spinner being displayed while a JS promise was executed. Since hitting ctrl-d does not stop the child program (which is tail -f in our case) anymore, when redirected, the cancellation is not detected when using gum >= 0.14 (except for 0.14.2)

The first gum example ported to QuickJS used to work fine and is now stuck once the spinner has disappeared, because the child process is still running

  • with gum 0.12
    Peek 2024-10-19 16-41
  • with gum 0.14.5
    Peek 2024-10-19 16-42

Desktop

  • OS: Ubuntu
  • Terminal: Konsole
  • Version: gum version 0.14.3,0.14.4,0.14.5 (0.14.2 and < 0.14 are ok)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant