Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 152825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:41:33+00:00 2026-05-11T09:41:33+00:00

According to Wikipedia , the forkbomb :(){ :|:& };: can be stopped with the

  • 0

According to Wikipedia, the forkbomb :(){ :|:& };: can be stopped with the zsh command while (sleep 100 &!) do; done, which will supposedly spawn sleep 100 processes until all the forkbomb processes are gone. This seems like magic; how does it work? I’m especially curious as to exactly what ‘&!’ means.

What would an equivalent command look like in bash?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:41:34+00:00Added an answer on May 11, 2026 at 9:41 am

    The reason that a fork-bomb works is because there is a finite limit to the number of processes that can be running at any one time, and a fork-bomb is designed to fill this limit.

    Because the forkbomb code you provided dies if it cannot spawn a child process, the parent processes do not actually hang around, but the fact that the children keep creating new grand*-children keeps the process table full.

    So the sleep solution is designed to sneak in some processes that just sleep for a short period of time, and for each sleep process that manages to be created, there are less fork-bombs happening. Eventually the sleep processes fill up the proces table themselves and the fork bombs die off.

    Once the process table is full off sleep processes the while loop can be killed, and the sleep processes will die once their sleep time is up. Problem solved.

    As has already been mentioned the important part of the zsh command is the run-in-background &, so the bash command would basically be the same as given in the other answers:

    while (sleep 100 &) do; done 

    I don’t think that the nohup/! part is important unless you want to log out within the sleep time, but I’d be happy to be set straight if I am wrong.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to Wikipedia, an embarrassingly parallel problem is one for which little or no
@if (@_jscript_version == 10) document.write(You are using IE10); According to Wikipedia IE10 will use
According to Wikipedia, the following is a very elegant bash fork bomb: :(){ :|:&
I was looking for a Command pattern implementation in Python... (According to Wikipedia ,
According to Wikipedia , function calls don't copy parameters which are are references to
According to http://en.wikipedia.org/wiki/Fold_(higher-order_function ), a right fold can operate on infinite lists if the
According to Wikipedia, the md5 sum of an empty string is d41d8cd98f00b204e9800998ecf8427e I confirmed
According to Wikipedia: IronScheme, an upcoming Scheme implementation, was planning to build upon the
According to Wikipedia this syntax looks correct... INSERT INTO dbo.metadata_type (name, publishable) VALUES (Content
According to this Wikipedia entry on the PNG format , a PNG image file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.