Messages in this thread | | | Date | Fri, 09 Aug 2002 10:48:55 +0200 | From | Helge Hafting <> | Subject | Re: [PATCH] Linux-2.5 fix/improve get_pid() |
| |
"Albert D. Cahalan" wrote:
> The problem is screen space, pure and simple. If the > default limit goes to over 1 billion, then "ps" output > must wrap lines. There is no alternative, unless you > think "System going down to reset PID numbers!" is OK. >
There is an alternative. Use 32-bit PID's, but with an additional rule for wraparound. Simply wrap the PID when (nextPID > 2*number_of_processes && nextPID > 30000) The latter one just to avoid wrapping at 10 when there are 5 processes.
This simple approach supports 32-bit PIDs for those that need them, while "ps" and friends always looks nice except for those who actually run large amounts of processes. You won't get a very large PID unless you need to.
Helge Hafting - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |