How to avoid forkbomb?

Parv parv at pair.com
Fri Mar 18 19:11:52 PST 2005


in message <423B879C.8020402 at confabulator.net>,
wrote Ryan J. Cavicchioni thusly...
>
> Ryan J. Cavicchioni wrote:
...
> >I decided to give the forkbomb script a try which is below:
> >
> >#!/bin/sh
> >
> >$0 & $0 &
> >
> >The system was unresponsive for a couple minutes but then FreeBSD
> >killed the script and the system was accessible.
> >
> >I started looking around for what my process limit was set at but

FWIW, i tried a version (in ksh88 and possibly whatever /bin/sh
would have been) on Sun Solaris 2.something (on Sparc), which caused
... absolutely nothing.

IIRC, the version i tried was something like...

  :(){ :|:& }; while true; do :; done


  - Parv

-- 



More information about the freebsd-questions mailing list