help-octave
[Top][All Lists]
Advanced

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

subprocesses


From: John W. Eaton
Subject: subprocesses
Date: Wed, 5 Feb 1997 15:27:22 -0600

On  5-Feb-1997, James Walter Taylor <address@hidden> wrote:

| I'm using octave to drive the testing of a pattern recognition
| program. An octave script generates a pattern, stores it in a 
| file and starts an external process which processes the data.
| 
| i.e. a loop around a construct like:
| 
| ---
| V = blah();
| fdx=fopen(tmpFile, 'w');
| fprintf(fdx, '%d\n', V);
| fclose(fdx);
| 
| [result,s] = system(['/home/james/newthing <' tmpFile ]); 
| 
| ---
| millions of times.  Well after only a few 10s of thousands of times
| I see errors like:
| 
| error: unable to start subprocess for `/home/james/newthing 
</tmp/7241Data.dat'
| error: evaluating index expression near line 24, column 14
| error: evaluating assignment expression near line 24, column 12
| ... etc.
| 
| And at that point even "ls" produces errors:
| ---
| octave:27> ls
| error: couldn't start process for ls!
| error: evaluating expression near line 27, column 1
| ---

This sounds like a bug.  It might be a bug in Octave, but I can't be
sure.

What version of Octave are you using?  What kind of system are you
using?  What does the external program do?

I took a guess, and tried running

  for i = 1:100000
    fn = tmpnam ();
    fd = fopen (fn, 'w');
    fprintf (fd, '%d\n', i);
    fclose (fd);
    [result, s] = system (['cat ', fn]);
    printf (result);
    fflush (stdout);
    unlink (fn);
  endfor

but it seems to work correctly.


Please send bug reports to address@hidden, and please
include enough information so that I might be able to fix the
problem.  The Bugs chapter in the Octave manual has a list of items
that should be in every bug report, and includes tips for writing bug
reports that will help to ensure that the bug is actually fixed.

Thanks,

jwe


reply via email to

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