help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Blocking I/O to gnuplot pipe


From: David Bateman
Subject: Re: Blocking I/O to gnuplot pipe
Date: Sat, 15 Feb 2003 03:01:18 -0600
User-agent: Mutt/1.3.28i

According to John W. Eaton <address@hidden> (on 02/14/03):
> On 14-Feb-2003, David Bateman <address@hidden> 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?

All I have to do is assure that gnuplot has opened the file before calling
unlink. So a usleep should be able to assure this.

The replot problem however will be a real pain. I think the solution Andy
suggested is the best, since at least it is consistent with what is done
with a straight gplot call.

> 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.

I'd thought about that too. I imagine the issue of replot is what you
are talking about here.

Time to give up :-)

D.

-- 
David Bateman                                address@hidden
Motorola CRM                                 +33 1 69 35 25 00 (Ph)
Espace Technologique, Commune de St Aubin    +33 1 69 35 25 01 (Fax)
91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]