help-octave
[Top][All Lists]
Advanced

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

Re: .m file locked under cygwin


From: John W. Eaton
Subject: Re: .m file locked under cygwin
Date: Wed, 18 Jan 2006 13:10:12 -0500

On 18-Jan-2006, Paul Probert wrote:

|   Thanks for the reply. Here's a program that causes the problem, file 
| test.m
| 
| x=[1,2,3,4];
| y=[4,1,6,7];
| plot(x,y);

OK, I can duplicate the problem.  When I run this script in Octave,
lsof shows

  COMMAND    PID USER   FD   TYPE DEVICE SIZE    NODE NAME
  gnuplot   3233  jwe    3r   REG  254,4   37 1361888 /export/home/jwe/test.m
  gnuplot_x 3234  jwe    3r   REG  254,4   37 1361888 /export/home/jwe/test.m

At first I was a bit confused by this, but now I think what is
happening is that Octave has the file test.m open when it executes the
plot function, so when the plot function execs gnuplot to display the
plot, it inherits the open file descriptors.  The same thing happens
when gnuplot execs gnuplot_x11, so that is why both process have those
files open.  To fix this, I suppose Octave needs to fork, close all
open file descriptors, then exec gnuplot.

As a quick workaround, can you make your script a function?  That
would avoid the problem of having test.m open when the plot function
is evaluated.

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



reply via email to

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