I have a piece of code that accepts the PID of a process to perform an operation upon.
Aside from performing any syscalls to validate the process (something that occurs later on) is there something I can do to assert a process ID is sane? e.g. I will never accept 0
since that doesn't make sense for the application.
Are there any concrete assertions/properties that can be utilized to do some naive sanity checking on PID values?