PID
PID
Posted Oct 8, 2011 0:22 UTC (Sat) by Richard_J_Neill (subscriber, #23093)In reply to: PID by sytoka
Parent article: A Plumber's Wish List for Linux
What about increasing the size of the pid maximum number? Otherwise, there is a real danger that the following code:
#!/bin/bash
process2 &
PID=$!
#do stuff for several hours.
kill $PID
exit
could end up killing the wrong process (if process2 exits, and the PID gets reused).
At least sequentially assigned PIDs make this not too probable: if the PIDs were randomly allocated, without increasing the possible range, it is riskier.
