Hi Bret,
Not too sure what you mean. I usually open it as a
pipe so open it just as you would a file, but using
popen (rather than fopen), pflush (rather than fflush)
and pclose (rather than fclose).
As soon as you pclose then your programme should close
gnuplot. Sounds like you might be doing something to
hang up gnuplot though.......
> I did something similar from PERL. The hitch is that
> the pipe is buffered.
> You can flush the pipe, but that only flushes the
> pipe's input, not it's
> output. So gnuplot waits forever. My workaround was
> to call gnuplot in a
> mode where it exits when it's done, using a file for
> the data and most of
> the commands, rather than piping everything in. This
> requires a temp file,
> of course, but you can re-use the same one if you
> don't plan on multiple
> users of your app.
>
> Bret
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
|