From: Ralf Date: 2003-01-31T03:23:02+09:00 Subject: Re: tkgnuplot problem: fork() on win (popen3 for windows?) nagai@ai.kyutech.ac.jp wrote: >>Now I get this: >>C:\Program Files\ruby\tkgnuplot\gnuplotP.rb:105:in `write': Invalid >>argument (Errno::EINVAL) >> from C:\Program Files\ruby\tkgnuplot\gnuplotP.rb:105:in `_send_cmd' >> from C:\Program Files\ruby\tkgnuplot\gnuplotP.rb:96:in `synchronize' >> from C:\Program Files\ruby\tkgnuplot\gnuplotP.rb:96:in `_send_cmd' >> from C:\Program Files\ruby\tkgnuplot\gnuplotP.rb:154:in `cmd' >> from C:\Program Files\ruby\tkgnuplot\gnuplotP.rb:184:in `set' >> from C:\Program Files\ruby\tkgnuplot\gnuplotP.rb:88:in `method_missing' >> from C:\Program Files\ruby\tkgnuplot\gnuplotP.rb:420 >> from C:\Program Files\ruby\tkgnuplot\gnuplotP.rb:419:in `synchronize' >> from C:\Program Files\ruby\tkgnuplot\gnuplotP.rb:419 >>Completed(1) > > It maybe fail to start gnuplot process. In Gordon Millers Gnuplot.rb this works to start gnuplot: @cmd = 'c:\program files\design\ gnuplot\gp371w32\pgnuplot.exe' # path to *my* gnuplot @gnuplot = IO::popen(@cmd, "w") > Please try the following check on irb. > > irb(main):001:0> require './gnuplot.rb' > irb(main):002:0> gp = GnuplotProcess.new > irb(main):003:0> gp.cmd('plot sin(x)') > same error message as before ... > # Original gnuplot.rb sets sync mode of subprocess's stdout to true > # before exec 'gnuplot'. Sorry that I can't be of more help to fix this. It would need someone more Ruby-literate than myself ... at least "fork" seems not to be a problem. cheers, Ralf.