[Gambas-user] Conflicting and bewildering help for pipes

Caveat Gambas at ...1950...
Tue Oct 29 15:12:50 CET 2013


If gnuplot is giving an error, wouldn't that appear on stderr, which you 
don't appear to be watching?

Just a thought...

Kind regards,
Caveat

On 29/10/13 15:04, Tobias Boege wrote:
> On Fri, 25 Oct 2013, Beno?t Minisini wrote:
>> Le 24/10/2013 15:08, Tobias Boege a ?crit :
>>> My workaround always was like this:
>>>
>>>     ' Create the read pipe special file
>>>     hGPstdout = Pipe "/tmp/gnuplotFIFO2" For Write
>>>     Close #hGPstdout
>>>     ' Create write end
>>>     hGPpipe = Pipe "/tmp/gnuplotFIFO1" For Write
>>>     ' Start writer
>>>     hGPproc = Shell "gnuplot </tmp/gnuplotFIFO1 >/tmp/gnuplotFIFO2"
>>>     ' Really create read end
>>>     hGPstdout = Pipe "/tmp/gnuplotFIFO2" For Read Watch
>>>
>>> Note that since the shell which starts hGPproc already opened
>>> /tmp/gnuplotFIFO2, you won't have any deadlock problems when opening
>>> hGPstdout For Read afterwards.
>>>
>>> Anyway, if I
>>>
>>>     Print #hGPpipe, "plot x^2"
>>>
>>> only garbage (not non-sense but the string is always scrambled) seems to
>>> arrive at gnuplot. Also, I seem to get output from gnuplot irregularly. So
>>> I'm out of options for now. I remember that raising Read events for streams
>>> has been subject to issues from time to time...
>>>
>>> Regards,
>>> Tobi
>>>
>> Please give details. I tried what you said (but "plot x*x" because"
>> "plot x^2" seems to not be the good syntax), and I always got the plot
>> as expected.
>>
> Oookay! I wrote "plot x*x" and it went flawlessly. However, since "plot x^2"
> was bad input, gnuplot sent an error message to me before. This just didn't
> come through to me correctly - which means: the output was only partly there
> or scrambled. Maybe buffering (although pipes are not buffered)? Maybe
> something else? I will try again when I've time.
>
> Regards,
> Tobi
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>





More information about the User mailing list