Last active
August 14, 2023 20:54
-
-
Save MonoidMusician/0baec7f1caf8ae662b0ecaafebf206f5 to your computer and use it in GitHub Desktop.
Weird bug(?) with fish not responding to SIGKILL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import subprocess | |
from time import sleep | |
import sys | |
buggy = True | |
file = "'" + sys.argv[1] + "'" | |
p = subprocess.Popen(["fish" if buggy else "bash", "-c", "ffplay -nodisp -autoexit -hide_banner -loglevel error " + file]) | |
sleep(5) | |
print(p.poll()) # None | |
sleep(0.5) | |
print(p.kill()) # None | |
sleep(0.5) | |
print(p.poll()) # -9 | |
sleep(20) | |
# if buggy = True | |
# it keeps playing ... | |
# - if you Ctrl+C, it will stop | |
# - but if you let this script exit, it will continue | |
# I guess bash also lets it outlive the script? | |
# (that is, if you comment out the p.kill()) | |
# idk what's going on lol | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment