Re: spawnProcess() not child?
Is there nobody that knows a solution? :(
Re: spawnProcess() not child?
On Sunday, 2 November 2014 at 00:59:43 UTC, Bauss wrote: Is there a way to spawn a process that won't be a child process, because I can't seem to kill any processes created with spawnProcess() It keeps giving me access denied for the processes and it's necessary for me to kill a process, compile it and then spawn it again. Taking a blind guess: Could it be that the process has already exited, and the PID got recycled and assigned to a new process? Then you would try to kill that process instead of your spawned one, which would fail if it doesn't belong to you.
Re: spawnProcess() not child?
The parent / child relationship always exists. In POSIX OSs, you may ignore SIGCHLD signal (announcing child process death), so that in case of child process exit it will not become zombie, rather it will be disposed on the spot. As a side note, in Linux, there exist a system call allowing process re-parenting, but it is intended for use in experimenting, rather than in normal use case. Side note II, there is no real chance of wrapping PID numbers around in a reasonable time frame.
Re: spawnProcess() not child?
On 11/3/14 6:34 AM, angel wrote: The parent / child relationship always exists. In POSIX OSs, you may ignore SIGCHLD signal (announcing child process death), so that in case of child process exit it will not become zombie, rather it will be disposed on the spot. As a side note, in Linux, there exist a system call allowing process re-parenting, but it is intended for use in experimenting, rather than in normal use case. Side note II, there is no real chance of wrapping PID numbers around in a reasonable time frame. From OP's code, he is on Windows. -Steve
Re: spawnProcess() not child?
On Monday, 3 November 2014 at 14:09:21 UTC, Steven Schveighoffer wrote: From OP's code, he is on Windows. I believe on Windows you have to sort out some kind of permissions to terminate a process. No idea if std.process does this, but it sounds like probably not.