Menu

#2490 no redirected output, gnuplot 5.4.3

None
closed-fixed
nobody
2022-07-11
2022-02-02
No

When running

gnuplot --version

Gnuplot produces a version info. Under Windows in a cmd window, when standard output is redirected to a file or pipelined, no such output is produced:

C:\Users\esc\Downloads>gnuplot543\bin\gnuplot.exe --version
gnuplot 5.4 patchlevel 3

C:\Users\esc\Downloads>gnuplot543\bin\gnuplot.exe --version  > vers.txt

C:\Users\esc\Downloads>type vers.txt

C:\Users\esc\Downloads>

vers.txt has zero bytes afterwards.

compare Gnuplot 5.4.2:

C:\Users\esc\Downloads>gnuplot542\bin\gnuplot.exe --version
gnuplot 5.4 patchlevel 2

C:\Users\esc\Downloads>gnuplot542\bin\gnuplot.exe --version  > vers.txt

C:\Users\esc\Downloads>type vers.txt
gnuplot 5.4 patchlevel 2

C:\Users\esc\Downloads>

Gnuplot 5.4.1 and 5.4.2 work well when redirected.

I expect the found behavior to be unintentional. Please mind that this breaks use cases where the Gnuplot version is checked from Python and Batch scripts.

Discussion

  • Bastian Märkisch

    • labels: --> Windows, console
    • summary: no version info when redirected to file, Gnuplot 5.4.3 --> no redirected output, gnuplot 5.4.3
    • Group: -->
    • Priority: -->
     
  • Bastian Märkisch

    It's actually worse than just the version output. My commit [e5f274] accidentally broke redirected output using printf(). Before just reverting this, I need to verify that I doesn't break UTF-8 output to screen again which this commit attempted to fix.

     

    Related

    Commit: [e5f274]

    • Takashi Yano

      Takashi Yano - 2022-02-07

      Due to this problem, gnuplot 5.4.3 (Windows binary) does not work properly with octave. Reverting the commit [e5f274] resolves the issue.

       

      Related

      Commit: [e5f274]

  • Bastian Märkisch

    • status: open --> pending-fixed
     
  • Bastian Märkisch

    Resolved in master. We use the console API to write to screen and standard file IO for pipes.

     
  • Tatsuro MATSUOKA

    I have confirmed that the problem solved in the current master branch.

     
  • Ethan Merritt

    Ethan Merritt - 2022-07-11
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.