jrudess / streamdvr

DVR for streaming entertainment
GNU General Public License v3.0
65 stars 16 forks source link

killarg="" # Note: Streamlink does not respond to SIGINT #107

Closed kuchenstrudel closed 5 years ago

kuchenstrudel commented 5 years ago

Streamlink seems to respond to SIGINT just fine, at least in my testings. See example below.

  1. streamlink -o test.mkv https://www.twitch.tv/$random_twitch_streamer best
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p_alt, 720p (best)
[cli][info] Opening stream: 720p (hls)
[download][test.mkv] Written 4.7 MB (12s @ 403.0 KB/s)
  1. kill -INT $PID
    Interrupted! Exiting...
    [cli][info] Closing currently open stream...
jrudess commented 5 years ago

Interesting. If I add -INT then the streamlink jobs never die, and I'm also unable to kill them manually from the shell unless I use sigterm.

Will investigate it more. I'm currently on 0.14.2.r150.g649f483a which looks like its only 7 commits behind the master branch.

kuchenstrudel commented 5 years ago

I'm using 0.14.2 from the package manager. Maybe node kill is different?

jrudess commented 5 years ago

I can't kill the streamlink processes from node or from outside in the shell either with SIGINT. Will downgrade to 0.14.2 release to see if its a newly introduced issue.

jrudess commented 5 years ago

I installed the package release instead of git repo, and at least on my arch system, streamlink never responds to 'kill -INT'.

Although, from googling around it seems that maybe on some systems it would have to be kill -SIGINT. So maybe its safer to just make it kill -2, as that looks like its constant.