Is there any chance the new process's pid is smaller than the existed ones ? I have a daemon process which will restart when be killed, I recorded the pids, and found that the pid first came smaller, and then go bigger.
what's the possible reason ?
===============================================================
sorry for asking & thanks for the answers.
I think I have found the answer. /proc/sys/kernel/pid_max shows 32768(android os on a phone), in the longtime test, it must have exceeded this,and reallocated. Thanks again.