On 11/24/19 10:36 AM, aliak wrote:
On Saturday, 23 November 2019 at 12:19:27 UTC, Steven Schveighoffer wrote:
On 11/23/19 4:54 AM, aliak wrote:
Is there a way to go about killing a process after spawning it on a
SIGINT?
I can't do this for e.g. because kill is not @nogc.
Pid currentSpawnedPi
On Saturday, 23 November 2019 at 12:19:27 UTC, Steven
Schveighoffer wrote:
On 11/23/19 4:54 AM, aliak wrote:
Is there a way to go about killing a process after spawning it
on a SIGINT?
I can't do this for e.g. because kill is not @nogc.
Pid currentSpawnedPid;
extern(C) void killCurrentPidHand
On Saturday, 23 November 2019 at 10:09:51 UTC, mipri wrote:
On Saturday, 23 November 2019 at 09:54:48 UTC, aliak wrote:
Is there a way to go about killing a process after spawning it
on a SIGINT?
I can't do this for e.g. because kill is not @nogc.
Well, this works:
import std;
import core.s
On 11/23/19 4:54 AM, aliak wrote:
Is there a way to go about killing a process after spawning it on a SIGINT?
I can't do this for e.g. because kill is not @nogc.
Pid currentSpawnedPid;
extern(C) void killCurrentPidHandler(int sig) nothrow @nogc @system {
kill(currentSpawnedPid, sig);
}
int
On Saturday, 23 November 2019 at 09:54:48 UTC, aliak wrote:
Is there a way to go about killing a process after spawning it
on a SIGINT?
I can't do this for e.g. because kill is not @nogc.
Well, this works:
import std;
import core.stdc.signal;
extern(C) int kill(int pid, int sig) nothrow @no
Is there a way to go about killing a process after spawning it on
a SIGINT?
I can't do this for e.g. because kill is not @nogc.
Pid currentSpawnedPid;
extern(C) void killCurrentPidHandler(int sig) nothrow @nogc
@system {
kill(currentSpawnedPid, sig);
}
int main() {
currentSpawnedPid = sp