Cannot timeout on Windows with Runner.run
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start in invoke/runners.py around the kill method at line 1313 and trace the timeout path used by Runner.run. Reproduce a timed-out command on Windows, then verify that timeout handling terminates it without the reported SIGKILL AttributeError.
Written by the indexing model from the issue text.
Description
Hi!
I am trying to timeout a command run using Runnner.run(..., timeout=3) (invoke >= 1.6.0, python == 3.7.11) but under Windows 10 I get the following error:
Traceback (most recent call last):
File "~\AppData\Local\Continuum\anaconda3\envs\Project\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "~\AppData\Local\Continuum\anaconda3\envs\Project\lib\threading.py", line 1177, in run
self.function(*self.args, **self.kwargs)
File "~\AppData\Local\Continuum\anaconda3\envs\Project\lib\site-packages\invoke\runners.py", line 1313, in kill
os.kill(pid, signal.SIGKILL)
AttributeError: module 'signal' has no attribute 'SIGKILL'
It seems that SIGKILL is not available in windows: https://docs.python.org/3/library/signal.html#signal.SIGKILL
Here is some more context, potential solutions and caveats: https://stackoverflow.com/a/35792192
- Dominant language
- Python
- Stars
- 4.8k
- Forks
- 412
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyinvoke/invoke
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AiursoftWeb/AnduinOS-2#19 ·