Created
November 20, 2014 08:45
Revisions
-
Drew Buglione created this gist
Nov 20, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ require 'timeout' loop do pid = fork if pid.nil? exec("youtube-dl https://www.youtube.com/playlist?list=PL47F408D36D4CF129") else begin Timeout::timeout(15 * 60) { Process.waitpid(pid, 0) } rescue Timeout::Error Process.kill("HUP", pid) end end end