18 Mar
2019
18 Mar
'19
3:46 p.m.
Seems reasonable to me.
Regards
Antoine.
On Mon, 18 Mar 2019 16:41:34 +0100
"Giampaolo Rodola'"
Hello, I've been having these 2 implemented in psutil for a long time. On POSIX these are convenience functions using os.kill() + SIGSTOP / SIGCONT (the same as CTRL+Z / "fg"). On Windows they use undocumented NtSuspendProcess and NtResumeProcess Windows APIs available since XP. The same approach is used by ProcessHacker and - I suppose - pssupend.exe, both from Sysinternals team. It must be noted that there are 3 different ways to do this on Windows (https://stackoverflow.com/a/11010508/376587) but NtSuspend/ResumeProcess appears to be the best choice. Possible use case:
<
> Thoughts?