On Thursday, 9 July 2015 at 02:33:23 UTC, tcak wrote:
I have written a code to run gnuplot.
[code]
...
auto script = std.stdio.File("/tmp/waveletscript.gnuplot", "w");
script.writeln("set term wxt 1; plot '/tmp/wavelet1.dat';");
script.writeln("set term wxt 2; plot '/tmp/wavelet2.dat';");
script.writeln("set term wxt 3; plot '/tmp/wavelet3.dat';");
script.close();
std.process.executeShell("gnuplot /tmp/waveletscript.gnuplot");
...
[/code]
I can see that gnuplot creates windows and plots, but then it
closes immediately. Anyway to execute the shell code in that
way that it detaches from running process? I do not want window
to be closing.
-----
BTW, as a tutorial to demonstrate use of gnuplot with D, is
there any place I can write an article?
I believe the reason is not because the parent exits, but that by
default gnuplot exits as soon as it has finished executing its
script. It has a `--persist` option that should prevent that.