tomerfiliba / plumbum

Plumbum: Shell Combinators
https://plumbum.readthedocs.io
MIT License
2.81k stars 183 forks source link

timeout not honored when running sleep command #685

Open crashbandicode opened 3 months ago

crashbandicode commented 3 months ago

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.