In article <Pine.NEB.4.30.0101291136040.424-100000 / michael.neumann.all>, Michael Neumann <neumann / s-direktnet.de> wrote: >On Mon, 29 Jan 2001, Phil Tomson wrote: > >> In article <9504t2$4lp$1 / b5nntp2.channeli.net>, >> ¹عبٌ¼·\(Park, Hee-Sob\) <phasis / channeli.net> wrote: >> > >> >"Phil Tomson" <ptkwt / user2.teleport.com> wrote in message >> (snipped all my whining about system and backticks not working right on >> windows) >> > >> >Hi, >> > >> >To remove system command or backticks problems on Windows, >> >you must build ruby biniary with MS Visual C++ compiler. >> > >> >> Hmmm... So that's what's going on. So the self-installing Windows version >> of Ruby is build on cygwin and that leads to these sorts of problems. >> Could someone make a Ruby Binary build with Visual C++ available? > >I've done that with a 1.4.6 version, see RAA under mswin32. >But it requires a lot more work than compiling with cygwin and >not everything works (e.g. popen). Actually, I need to get popen to work under Win98 as well. What I'm trying to do is send a "^C" to the STDIN of a program running in a subprocess. Here's the code (It works fine on NT, but not on Win98): def timedSystemCommand( command, time=10 ) killed = 0 exitcode = 0 cmdstdin = nil begin timeout(time) do cmdstdin = IO.popen("#{command}","w") Process.wait end rescue TimeoutError puts "got a timeout error" cmdstdin.putc "^C" killed = 1 end return killed, exitcode end Is there anyway to get this same kind of functionality to work on Windows98 as well? (it works fine on NT and Linux) You mention that popen won't work even if you compile with VC++ - is there any way to change this? Phil