[Gambas-user] Conflicting and bewildering help for pipes

Bruce bbruen at ...2308...
Thu Oct 24 01:32:05 CEST 2013


>From "Stream & input/Output functions"|"PIPE":

1. If I specify READ WATCH then according to the help "If at least one
byte can be read from the pipe, then the event handler File_Read() is
called." but what is the name of event handler. Surely it cant be
"File_Read"?

2. According to the first example, it opens a pipe FOR INPUT. Surely
this is incorrect.

3. (Not help related) If I want to catch output from a shelled command
then what order to I have to do things? I am trying to use two pipes to
communicate with a gnuplot process, one to send commands and one to
catch any error output.
  hGPpipe = Pipe "/tmp/gnuplotFIFO1" For Write
  hGPstdout = Pipe "/tmp/gnuplotFIFO2" For Read Watch 
  hGPproc = Shell "gnuplot < /tmp/gnuplotFIFO1 > /tmp/gnuplotFIFO2"

Sending commands by writing to hGPpipe works OK (sort of, there are
instances of junk getting in there.) but I can't figure out how to catch
the output?

tia
Bruce





More information about the User mailing list