|
|
|
|
|
by philsnow
1877 days ago
|
|
> The proper fix is to keep some PID values allocated. Do not free a PID value until all the children of it have died. Any fork bomb at all will exhaust the pid graveyard, wouldn't it? You could change pid_t to 64 bits but then the pid graveyard would take a lot of memory in the kernel. |
|
For other situations, just keep the direct parents. Worst case, that doubles the PID usage.