don
|
|
response 79 of 80:
|
Sep 19 23:54 UTC 1999 |
Here's how I think they do it (ignoring syntax):
foo()
for (n=1,n<1000/*Or something equally large*/,n++)
{
mkdir("%d",n);
chdir("%d",n);
spawn(foo.c);
chdir("..");
}
This would create a tree with 1000 branches at each level, and infinitely deep
(ie, until stopped by staff or some sort of filesystem limitation).
At least, this is how I'd do it.
|
janc
|
|
response 80 of 80:
|
Sep 20 00:39 UTC 1999 |
Yup, except on Grex it would probably create maybe 50 directories before
all your processes, including your login shell, suddenly and
mysteriously died. These days our fork bomb defenses are very
effective, and that little program is a fork bomb.
|