Handle KeyboardInterrupt #970

Closed
opened 2022-10-12 16:28:21 +02:00 by dacevedo12 · 0 comments
dacevedo12 commented 2022-10-12 16:28:21 +02:00 (Migrated from github.com)

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

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
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
justin/makes#970
No description provided.