문제

As the question above says : Is the PID of a process unique in long term ?

I'm trying to add one table that represents a Process into my database. To deal this do I need to put its PID as a primary key or an auto-generated id?

도움이 되었습니까?

해결책

It depends on the OS, however normally a PID will only be unique for as long as that process is running.

That is, as long as your process is running no other process will be given a PID the same as your process, however as soon as a process has terminated another process can (and most likely will eventually) be given the same PID.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top