|
-
October 5th, 2005, 11:01 PM
#1
why won't this code eat up my resources..
shouldn't it multiply and slow down my system.
int main(){
int x = 1;
while(x){
int fork(void);
}
return 0;
}
-
October 5th, 2005, 11:09 PM
#2
try this for a fork bomb.
#include <unistd.h>
int main(void)
{
while(1) {
fork();
}
return 0;
}
Antionline in a nutshell
\"You\'re putting the fate of the world in the hands of a bunch of idiots I wouldn\'t trust with a potato gun\"
Trust your Technolust
-
October 5th, 2005, 11:21 PM
#3
ummm... I may be just being stupid here...
But I don't see any functional difference between those, aside from the #include, which I assume unhappy simply didn't paste.
What's the difference?
Government is like fire - a handy servant, but a dangerous master - George Washington
Government is not reason, it is not eloquence - it is force. - George Washington.
Join the UnError community!
-
October 5th, 2005, 11:59 PM
#4
Junior Member
what's that? please give a brief intro...
buat baik berpada-pada,buat jahat jangan sekali
-
October 6th, 2005, 06:40 AM
#5
Hi
While the first example by unhappy simply declares a function fork()
with "void fork(int);" the second by hogfly actually calls system's
fork()-function thus spawning a child process.
Cheers
If the only tool you have is a hammer, you tend to see every problem as a nail.
(Abraham Maslow, Psychologist, 1908-70)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|