Masschelein Bart
7/4/2005 12:24:00 PM
Hello everyone,
I'm new to Ruby, a friend talked about it some days ago with great pleasure, so I was interested in giving it a shot. I was quite happy when I saw that the Perl scripts I had only required little change to still be working in Ruby. They are simple scripts though, mainly system call wrappers. But here is exactly where the problem comes. When I do in Perl sth like
system "$decoder $bitstreamPath $yuvOutputPath";
I can interrupt the execution with ctrl-c. The Ruby script does what it is expected to, but I cannot interrupt the program with ctrl-c anymore, and have to wait until the execution is finished. I tried several alternatives:
system "#{$decoder} #{$bitstreamPath} #{$yuvOutputPath}";
syscall "#{$decoder} #{$bitstreamPath} #{$yuvOutputPath}";
exec "#{$decoder} #{$bitstreamPath} #{$yuvOutputPath}";
system $decoder, $bitstreamPath, $yuvOutputPath
but none is interuptable... is there something fundamental I am missing in the way Ruby handles system calls?
Oh, I am running Cygwin on 2000. In case its important.
Bart.