Why do pids jump in a container?
by YuvalAvra from LinuxQuestions.org on (#53YEH)
Entering a container (e.g. `docker run` or `docker exec`) makes the PID of next created process jump ahead, why is that?
For example, in the image below the second process in the container (`ps`) is assigned PID 10, not PID 2:
Attachment 33283
According to this answer, Linux appears to be allocating PIDs in a sequence, is that not the case?
Attached Thumbnails


For example, in the image below the second process in the container (`ps`) is assigned PID 10, not PID 2:
Attachment 33283
According to this answer, Linux appears to be allocating PIDs in a sequence, is that not the case?
Attached Thumbnails