comparison scripts/plot/__gnuplot_open_stream__.m @ 12073:fe30458b1de8 release-3-2-x

try to avoid gnuplot zombies
author John W. Eaton <jwe@octave.org>
date Wed, 26 Aug 2009 08:17:08 +0200
parents 4bb94a71913b
children
comparison
equal deleted inserted replaced
12072:33c46d112b05 12073:fe30458b1de8
26 cmd = gnuplot_binary (); 26 cmd = gnuplot_binary ();
27 if (npipes > 1) 27 if (npipes > 1)
28 [plot_stream(1), plot_stream(2), pid] = popen2 (cmd); 28 [plot_stream(1), plot_stream(2), pid] = popen2 (cmd);
29 if (pid < 0) 29 if (pid < 0)
30 error ("__gnuplot_open_stream__: failed to open connection to gnuplot."); 30 error ("__gnuplot_open_stream__: failed to open connection to gnuplot.");
31 else
32 plot_stream(3) = pid;
31 endif 33 endif
32 else 34 else
33 plot_stream = popen (cmd, "w"); 35 plot_stream = popen (cmd, "w");
34 if (plot_stream < 0) 36 if (plot_stream < 0)
35 error ("__gnuplot_open_stream__: failed to open connection to gnuplot."); 37 error ("__gnuplot_open_stream__: failed to open connection to gnuplot.");