4 ms·
The parent always exits (fork() returns the nonzero child pid in the parent, and 0 in the child), meaning that at any point there’s only one process that is act
by nneonneo 8y ago
The parent always exits (fork() returns the nonzero child pid in the parent, and 0 in the child), meaning that at any point there’s only one process that is actively forking. A typical fork bomb, on the other hand, floods the system with processes that are all attempting to call fork, resulting in an exponentially growing set of processes until the system runs out of resources.