octave-maintainers
[Top][All Lists]
Advanced

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

Re: wait_for_file ??


From: Michael D Godfrey
Subject: Re: wait_for_file ??
Date: Tue, 07 Sep 2010 19:00:00 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Thunderbird/3.1.2

Here is what is wrong between the glps_renderer::draw code in
gl2ps-renderer.cc and the code in print.m:

octave:1> plot(1:20)
octave:2> print ('gl2ps_t1x.pdf','-dpdf')
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
warning: print.m: Error: /undefinedfilename in (/tmp/oct-m3WCVr.eps)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
Dictionary stack:
   --dict:1158/1684(ro)(G)--   --dict:0/20(G)--   --dict:70/200(L)--
Current allocation mode is local
Last OS error: 2
, 'gl2ps_t1x.pdf'.
warning: print.m: No such file or directory, '/tmp/oct-m3WCVr.eps'.
octave:3> fclose of /tmp/oct-m3WCVr.eps OK>
================================================
See the last line above.  This line came from the glps_renderer:: draw code after it
had written and fclosed the file
/tmp/oct-m3WCVr.eps.  The code added to
::draw is:    (line 83 of gl2ps_renderer.cc)
//      gnulib::fclose (fp);
       fflush(fp);
       if(fclose(fp) == 0) {printf("fclose of %s OK>\n", filename.c_str());fflush(stdout);}
================================================
Also, note that Octave got all the way back to the command prompt before glps_renderer::draw
was done.
So, for some reason the print.m code continues to run even though glps_renderer
has not completed.    Does anyone know right away how to make the print.m code
wait until glps_renderer::draw is done (without the kludge that we tried)?

Michael



reply via email to

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