Hi,
just updated to 5.0 rc1, it seems that on Windows (8.1) the pipes are not working.
I.e. I use a text file inp.txt:
set terminal png
set output 'c:/temp/out.png'
plot sin(x)
exit
While
C:\temp>"c:\Program Files (x86)\gnuplot465\bin\gnuplot.exe" < inp.txt
works fine, the same on gnuplot 5.0
C:\temp>"c:\Program Files (x86)\gnuplot50rc1\bin\gnuplot.exe" < inp.txt
hangs until infinity, i.e. I have to kill gnuplot.exe via the task manager to return to the shell.
Best regards,
Florian
Perhaps this is related qt terminal.
Please try
set GNUTERM=windows
or
set GNUTERM=wxt
and then test
"c:\Program Files (x86)\gnuplot465\bin\gnuplot.exe" < inp.txt
Tatsuro
Oops
Not
"c:\Program Files (x86)\gnuplot465\bin\gnuplot.exe" < inp.txt
but
"c:\Program Files (x86)\gnuplot50rc1\bin\gnuplot.exe" < inp.txt
I have tested using following command.
cd "E:\usr\Tatsu\program\Gnuplot\test21"
E:
set GNUTERM=wxt
"C:\Programs\gp50rc1-64\bin\gnuplot" < gppipetest.txt
set GNUTERM=windows
"C:\Programs\gp50rc1-64\bin\gnuplot" < gppipetest.txt
set GNUTERM=qt
"C:\Programs\gp50rc1-64\bin\gnuplot" < gppipetest.txt
The file gppipetest.txt contains :
gppipetest.txt pipe test command
plot sin(x)
pause 2
For wxt and windows terminals, pipe works as expected.
However, for qt terminal,
E:\usr\Tatsu\program\Gnuplot\test21>"C:\Programs\gp50rc1-64\bin\gnuplot" < gppip
etest.txt
gnuplot> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
^
line 0: invalid command
gnuplot hangs.
I have also tested Kakuto's binary (http://ctan.ijs.si/mirror/w32tex/w32/)
For wxt and windows terminals, pipe also work as expected
For qt terminal, gnuplot hangs without output.
I have done the similar test on Ubuntu 12.04 LTS 64 bit with gnuplot 5.0-rc1 with qt terminal. Pipe works as expected with qt terminal.
This seems to be a bug of qt terminal on windows.
Tatsuro
Akira Kakuto suggested that codes for windows of int qt_waitforinput(int options) in qt_term.cpp should be revised for pipe to be accepted.
The report actually was for the
pngorpngcairoterminal. So that is a separate issue.For the
qtterminal, reading from stdin was actually supposed to work and the code to read is in place. I'll see if I can find out what is going wrong.If I set GNUTERM to wxt or windows, 'gnuplot < inp.txt' works without problem.
Even if I change 'set terminal png' to 'set terminal pngcairo' and I set GNUTERM to wxt or windows, 'gnuplot < inp.txt' works without problem.
I think that the png and pngcairo itself does not have problem.
The problem occurs when initial terminal is qt.
inp.txt sightly modified from original
set terminal png
set output 'out.png'
plot sin(x)
exit
Thanks for the report. Now fixed in CVS.
I have confirmed the fix. Thanks a lot!