Octave executed with input and output redirection, plots not responding

Problem description

Background: in a GUI application (written in dotnet) I’m executing octave-gui.exe as a process with redirected stdin, stdout and stderr. Users see stdout and stderr and have the possibility to send commands to Octave’s stdin. The GUI sends commands to Octave, too. All this is done to provide functionality (implemented in Octave) to users who may not want to know about details while providing easy hackability to advanced users.

This works with Octave 3.2 (although I am using gnuplot in this case) and 6.4 (qt), but not with 7.x.

6.4 already needs a workaround for responding (qt) plots: send “pause(0.01);” or “drawnow();” to the Octave process every 100ms.

Without that workaround, qt plots get drawn, have a working menu and button bar, mouse coordinates are displayed, but zooming/rotatating them is not possible.

With 7.3, this workaround does not work sufficiently, because CPU usage is high and Octave responds slowly.

Both are called using “–interactive --no-history --no-init-file --no-line-editing --no-gui”.

I notice that when calling octave-gui.exe --no-line-editing --no-gui from cmd.exe, plots behave the same (no zooming).

Option 1: use --line-editing. May help, but my commands (send via stdin) do not seem to reach Octave.

Option 2: use --no-line-editing, but have some way of calling gh_mgr.process_events or extern OCTINTERP_API void sleep (double seconds, bool do_graphics_events = false) with do_graphics_events=true? Maybe this is less “expensive” than calling drawnow? However, I did not find a way to achieve that.

So this is what I tried with no luck.

Is there a way to success using one of the options above or by something completely different?

My system

Windows 10
From official downloads:

Best regards,