From: "L." Date: 2008-09-16T05:57:45+09:00 Subject: Re: Thread popen and broken pipe problem Found it, when io is set after popen use, it's easy to get the process ID and then to correctly kill it during its execution. #get the process id IO.popen(cmd){ |pipe| current_process = pipe.id # Saving the PID pipe.each_line {|l| puts l } #kill the process Process.kill("KILL", current_process) et voila.