octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #51388] Current directory does not change imme


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #51388] Current directory does not change immediatly with "cd" on some systems
Date: Wed, 5 Jul 2017 18:24:01 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Follow-up Comment #11, bug #51388 (project octave):

For an example of something that will likely fail often, and that will serve
as an example of what I'm talking about, try this example.  It fails
immediately with the "file not created" message on my Debian system:


more off

filename = [mfilename('fullpath'), '.xlsx'];
for i= 1:10000
  if exist(filename, "file")==2
    delete(filename);
  end
  if exist(filename, "file")==2
    error ("File NOT deleted!, i = %d", i);
  end
  t_xlsx = tic;
  system (sprintf ("touch %s", filename), false, "async");
  toc (t_xlsx)
  if !exist (filename)
    error ("xlsx file NOT created!, i = %d", i);
  endif
endfor


Adding a delay after the call to system will probably allow it to work more
often, depending on the length of the delay.  But this is clearly an
interprocess race condition and not a bug in Octave.

Is it possible this is the kind of thing that is happening with xlswrite?  Is
the writing and closing of the file happening directly in Octave code (a DEFUN
function or .m code) or is it happening in some external process that may not
actually create before xlswrite returns?



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51388>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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