M
Me Me
Hi,
I would like to launch a process (external executable) and raise an
exception if I cannot read any output from it on the stdout.
Is that possible?
Thanks in advance
def execute_mencoder(command)
IO.popen(command) do |pipe|
pipe.each("\r") do |line|
puts line
end
end
raise MediaFormatException if $?.exitstatus != 0
end
I would like to launch a process (external executable) and raise an
exception if I cannot read any output from it on the stdout.
Is that possible?
Thanks in advance
def execute_mencoder(command)
IO.popen(command) do |pipe|
pipe.each("\r") do |line|
puts line
end
end
raise MediaFormatException if $?.exitstatus != 0
end