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

Handle KeyboardInterrupt #970

Closed
dacevedo12 opened this issue Oct 12, 2022 · 0 comments
Closed

Handle KeyboardInterrupt #970

dacevedo12 opened this issue Oct 12, 2022 · 0 comments

Comments

@dacevedo12
Copy link
Collaborator

When canceling the execution of a job via ^C a traceback is shown

^CTraceback (most recent call last):
  File "/nix/store/p729krh0vah22znzj4zrlyg7ivyhqvqk-src/src/cli/main/__main__.py", line 11, in <module>
    main(sys.argv)
  File "/nix/store/p729krh0vah22znzj4zrlyg7ivyhqvqk-src/src/cli/main/cli.py", line 769, in main
    cli(args)
  File "/nix/store/p729krh0vah22znzj4zrlyg7ivyhqvqk-src/src/cli/main/cli.py", line 572, in cli
    code = _cli_build(attr, config, head, out, src)
  File "/nix/store/p729krh0vah22znzj4zrlyg7ivyhqvqk-src/src/cli/main/cli.py", line 615, in _cli_build
    code = _run(
  File "/nix/store/p729krh0vah22znzj4zrlyg7ivyhqvqk-src/src/cli/main/cli.py", line 468, in _run
    return process.wait()
  File "/nix/store/xf1k5k05vg3zn7dfcpfh1qa7ga48hi3m-python3-3.10.6/lib/python3.10/subprocess.py", line 1207, in wait
    return self._wait(timeout=timeout)
  File "/nix/store/xf1k5k05vg3zn7dfcpfh1qa7ga48hi3m-python3-3.10.6/lib/python3.10/subprocess.py", line 1941, in _wait
    (pid, sts) = self._try_wait(0)
  File "/nix/store/xf1k5k05vg3zn7dfcpfh1qa7ga48hi3m-python3-3.10.6/lib/python3.10/subprocess.py", line 1899, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt
/nix/store/xf1k5k05vg3zn7dfcpfh1qa7ga48hi3m-python3-3.10.6/lib/python3.10/subprocess.py:1070: ResourceWarning: subprocess 48781 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback

It leaves one wondering if there's a bug or if the underlying process actually stopped

dacevedo12 added a commit to dacevedo12/makes that referenced this issue Feb 9, 2024
- both in subprocess and main
- to catch the case where the tui hasn't even started yet
dacevedo12 added a commit to dacevedo12/makes that referenced this issue Feb 9, 2024
- both in subprocess and main
- to catch the case where the tui hasn't even started yet

Signed-off-by: David Acevedo <dacevedoa12@gmail.com>
dacevedo12 added a commit to dacevedo12/makes that referenced this issue Feb 9, 2024
- both in subprocess and main
- to catch the case where the tui hasn't even started yet

Signed-off-by: David Acevedo <dacevedoa12@gmail.com>
dacevedo12 added a commit to dacevedo12/makes that referenced this issue Feb 9, 2024
- both in subprocess and main
- to catch the case where the tui hasn't even started yet

Signed-off-by: David Acevedo <dacevedoa12@gmail.com>
dsalaza4 added a commit that referenced this issue Feb 9, 2024
feat(build): #970 handle keyboard interrupt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants