is there an equivalent to the function kill() on Windows?
int kill(pid_t pid, int sig);
If not, would it be possible to test if a process is running based on its PID?
Thanks
is there an equivalent to the function kill() on Windows?
int kill(pid_t pid, int sig);
If not, would it be possible to test if a process is running based on its PID?
Thanks
No signals in Windows. If true killing is intended then use TerminateProcess(). You need a handle to the process, get that from OpenProcess(). You'll need to ask for the PROCESS_TERMINATE access right. CloseHandle() to close the handle.
Windows doesn't have signals in the unix sense.
You can use
OpenProcess
to check if a process exists - If it succeeds, or fails with an access error, then the process exists.