From help-octave-request at bevo dot che dot wisc dot edu Fri Feb 14 12:11:54 2003 Subject: Blocking I/O to gnuplot pipe From: "John W. Eaton" To: David Bateman Cc: Date: Fri, 14 Feb 2003 12:11:46 -0600 On 14-Feb-2003, David Bateman wrote: | So, what I wanted to know. Is there a file descriptor for the gnuplot | pipe in a script file? Can I use "fcntl" on it to clear the | O_NONBLOCK flag? I don't think there is really a solution for this problem (other than fixing gnuplot, or perhaps giving up on it entirely for Octave). Even if you delete the file as soon as gnuplot has opened it the first time, then replot will fail. And how do you know that gnuplot will have it opened immediately after you send the command, even with blocking I/O? Isn't there still a race condition? BTW, you might also think that it would be better to use gnuplot's ability to read data in the command stream, but that has other problems that are just about as bad. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------