digitalmars.D.learn - How to keep executed shell running after program exits
- tcak (18/18) Jul 08 2015 I have written a code to run gnuplot.
- "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> (4/22) Jul 09 2015 I believe the reason is not because the parent exits, but that by
- "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> (2/4) Jul 09 2015 http://wiki.dlang.org/Tutorials
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?
Jul 08 2015
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.
Jul 09 2015
On Thursday, 9 July 2015 at 02:33:23 UTC, tcak wrote:BTW, as a tutorial to demonstrate use of gnuplot with D, is there any place I can write an article?http://wiki.dlang.org/Tutorials
Jul 09 2015