Are the System and System Idle Process PIDs constant on Windows?

On several Windows XP systems that I looked at, the "System Idle Process" always has a PID of 0, and the "System" process always has a PID of 4. In a Windows program that lists processes, is it safe to recognize these processes as these PIDs or they can be different in some cases?

+3
source share
2 answers

I have production code that assumes these PIDs are static and it works on XP, Vista, and Win 7. Not sure if this is an officially supported method!

A few more ways to solve the problem:

  • PID - System Idle System .
  • PID - Idle System PID 0.
+3

, - PID, . . ? .

+1

Source: https://habr.com/ru/post/1741238/


All Articles