Re: Execute the Shell command and continue executing the algorithm

2022-05-31 Thread Jack via Digitalmars-d-learn
On Tuesday, 31 May 2022 at 15:29:16 UTC, frame wrote: On Monday, 30 May 2022 at 11:18:42 UTC, Alexander Zhirov wrote: if (here is my condition termination of the program) OT: Wouldn't it be great to have ArnoldC support? ;-) i'm pretty sure the terminattor is more efficient than kill

Re: Execute the Shell command and continue executing the algorithm

2022-05-31 Thread frame via Digitalmars-d-learn
On Monday, 30 May 2022 at 11:18:42 UTC, Alexander Zhirov wrote: if (here is my condition termination of the program) OT: Wouldn't it be great to have ArnoldC support? ;-)

Re: Execute the Shell command and continue executing the algorithm

2022-05-31 Thread Christian Köstlin via Digitalmars-d-learn
On 2022-05-30 15:25, Ali Çehreli wrote: On 5/30/22 04:18, Alexander Zhirov wrote: > I want to run a command in the background The closest is spawnShell: import std.stdio; import std.process; import core.thread; void main() {   auto pid = spawnShell(`(sleep 1 & echo SLEEP >> log)`);  

Re: Execute the Shell command and continue executing the algorithm

2022-05-30 Thread Krzysztof Jajeśnica via Digitalmars-d-learn
On Monday, 30 May 2022 at 11:18:42 UTC, Alexander Zhirov wrote: I want to run a command in the background during the execution of the algorithm, and without waiting for its actual execution, because it is "infinite", while continuing the execution of the algorithm and then, knowing the ID of

Re: Execute the Shell command and continue executing the algorithm

2022-05-30 Thread Ali Çehreli via Digitalmars-d-learn
On 5/30/22 04:18, Alexander Zhirov wrote: > I want to run a command in the background The closest is spawnShell: import std.stdio; import std.process; import core.thread; void main() { auto pid = spawnShell(`(sleep 1 & echo SLEEP >> log)`); Thread.sleep(5.seconds); kill(pid);

Execute the Shell command and continue executing the algorithm

2022-05-30 Thread Alexander Zhirov via Digitalmars-d-learn
I want to run a command in the background during the execution of the algorithm, and without waiting for its actual execution, because it is "infinite", while continuing the execution of the algorithm and then, knowing the ID of the previously launched command, kill the process. So far I have