kill and thisProcessID
"Nordlöw" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jun 24 04:39:50 PDT 2015
I have a process that shall suspend itself using SIGTSTP or
SIGSTOP.
My current plan is
import std.process: thisProcessID, kill, Pid;
import core.sys.posix.signal: SIGKILL, SIGSTOP, SIGTSTP;
const thisPid = thisProcessID;
// some call to kill()
but kill() needs a `Pid`
so
kill(thisPid, SIGTSTP);
fails and constructing Pid cannot be done because
kill(new Pid(thisPid), SIGTSTP);
errors as
Error: class std.process.Pid member this is not accessible
What to do?
More information about the Digitalmars-d-learn
mailing list