plumbum
plumbum copied to clipboard
timeout not honored when running sleep command
I am running python 3.12.4 on Ubnutu 24.04
To reproduce:
then open the python console and do:
import plumbum
mycmd = plumbum.local["timeout"]['-s']['SIGKILL']['1s']['sleep']['infinity']
mycmd(timeout=1)
the above hangs forever. Interestingly the following doesn't hang:
import plumbum
mycmd = plumbum.local["timeout"]['-s']['SIGKILL']['1s']['sleep']['infinity']
mycmd()
So introducing the timeout causes a hang for some reason.
I've been using the timeout
linux utility as a workaround for when plumbum doesn't timeout correctly. I'm just now getting around to making a bug and this reproduces the issue.