:(){ :|:& };:
could you please help to explain this? Thanks a lot.
Regards!
Bo
http://www.cyberciti.biz/faq/understanding-bash-fork-bomb/
http://www.cyberciti.biz/tips/linux-limiting-user-process.html
just googled fork bomb !
--
Want to write?
first read:
http://www.dmoz.org/Computers/Usenet/
Regards!
Bo
bomb()
{
bomb &
bomb &
}; bomb
Does above works? I can't execute above code in my machine because it
is a server, if the code works, I then make a mistake...
I mean, do we need the PIPE between the two call exactly? Thanks!
Regards!
Bo
Either version will 'work' - the pipe is not needed per se, all
that is needed is for two children to be spawned at each iteration.
The key thing here is not the absolute number of processes, but
the number of simultaneously _runnable_ processes. Depending on
the precise syntax used, the caller will either termiminate after
spawning the processes or wait for them to terminate, neither of
which causes any particular problems. If each iteration only
creates a single new process then only one process is runnable at
any given time - this will waste CPU time but not cripple a system.
If the parent hangs around waiting for its children (which it won't
in the above examples) then you will likely hit the number of
processes per user limit before anything disastrous happens.
How you create two invocations doesn't really matter. Pipes are
one way, and &'s are another. The :(){ :|:& };: form has the
'advantage' of being obscured meaning that it is more likely that
you can persuade someone to run that code.
--
Andrew Smallshaw
and...@sdf.lonestar.org
Yeah, the key point here it to make the shell fork new processes and
that is what '&' and '|' can do, I understand, thanks a lot!
Regards!
Bo