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: Fri, 03 Sep 2010 09:12:47 -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

Ben,

Here is something that I do not understand.

    unwind_protect_cleanup
      printf("fflush(fid) of %s returned %d\n", offsetfile, fflush(fid));
      status = fclose (fid); printf("status: %d\n", status);
     
      if (status == -1)
        error ("print:fclosefailed", "__ghostscript__.m: fclose() failed.");
      endif
      fid = fopen (offsetfile, "r");
      if(fid =! 0) printf("error on fopen %s\n\n\n", offsetfile); endif
      fclose(fid);
    end_unwind_protect

================================
This code fails due to the fact that the fid = fopen(offsetfile,"r");
returns -1.  The fflush and fclose return 0, but the following fopen fails.
Something is fundamentally wrong here.

Any ideas?
Michael


reply via email to

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