Hello,
I’m writing an interface for a command line utility. When I press a
start button, the callback calls Kernel.exec to make use of the command
line utility, passing to it the information collected from the UI. Well,
that’s what I wanted to do, cause what really happens is that the new
process (the command line utility) starts, but the GUI crashes, without
any message… Any ideas of why could be happening this crash? I’ve
tried also making a thread for the Kernel.exec part, but it crashes
too…
Here is the method that doesn’t work:
def button2_clicked(widget)
nombre_destino = @entry1.text
pelicula = @filechooserbutton1.filename
subtitulos = @filechooserbutton2.filename
size = @spinbutton1.value
@thread = Thread.new {
begin
exec("mencoder -sub ‘#{subtitulos}’ -subfont-text-scale #{size}
" +
"’#{pelicula}’ -ovc lavc -lavcopts " +
"vcodec=mpeg4:vhq:vbitrate=1000 -oac mp3lame " +
“-lameopts br=256:vol=1 -ffourcc DIVX -o ‘#{nombre_destino}’”)
rescue
puts “error”
end
}
end
Thank you very much for your help.