Chet Ramey <chet.ra...@case.edu> writes: > And that's the problem. Bash assumes that there's a PID space at least as > large as CHILD_MAX, and that the kernel will use all of it before reusing > any PID in the space. Posix says that shells must remember up to CHILD_MAX > statuses of terminated asynchronous children (the description of `wait'), > so implicitly the kernel is not allowed to reuse process IDs until it has > exhausted CHILD_MAX PIDs.
I cannot see how CHILD_MAX is related to pid reuse. CHILD_MAX is a per-user limit, but the pid namespace is global. If the shell forks a new process, and the pid of it matches one of the previously used pids for asynchronous jobs it can surely discard the remembered status for that job. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."