Dendarii
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Napain@lemmy.ml to Programmer Humor@lemmy.ml · 1 year ago

:3{:3|:3&};:3

lemmy.ml

message-square
75
fedilink
1

:3{:3|:3&};:3

lemmy.ml

Napain@lemmy.ml to Programmer Humor@lemmy.ml · 1 year ago
message-square
75
fedilink
  • perishthethought@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    ELI5?

    • Davel23@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      https://www.youtube.com/watch?v=nB_s79lHSVs

      • PlutoniumAcid@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Just a sentence, please kind sir, not a video?

        • DaGeek247@fedia.io
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          Fork bombs are things that infinitely spawn new forks, until the system crashes. Its an infinite ‘if true, spawn new instance’ loop that only stops when the system gets a hard reset.

        • wise_pancake@lemmy.ca
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          Is a fork bomb, it starts a process that starts two more processes, which each start two more processes, which each start two more processes, which each start two more processes…

          And eventually the computer locks up plus it’s hard to kill since the PIDs change constantly.

        • Classy@sh.itjust.works
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          Maybe he thought the topic was interesting and wanted to share more details with us? I appreciate the video.

        • Darkrai@kbin.social
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          Its creating a function named : that spawns two copies of : then calls that function to start the duplicating code or forks. For that, its called a fork bomb.

          • NegativeLookBehind@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            edit-2
            2 months ago

            deleted by creator

        • Midnight Wolf@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 year ago

          https://en.wikipedia.org/wiki/Fork_bomb

          Self-replicating program, malicious

    • aldalire@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      1 year ago

      Replace “:” with “a” you get

      a() a a&; a

      Reformatting

      a() {

      a | a &

      };

      a

      So it creates a function, a, which what it does is it calls itself and pipes its output to itself (the a | a). The ampersand means that this will run entirely in the background. Then, to initiate things, the command calls a (in the last line)

      So, there will be exponentially be many recursive calls to a, which will eventually deplete your stack and set your pc on fire

      • Omega_Haxors@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        Use `` to disable text formatting, it's intended for code but it can be used for anything where formatting shouldn't be considered

      • FilthyShrooms@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        This is why I should not be allowed to use Linux

        • starpanda@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          on windows a forkbomb is literally %0|%0 iirc

          • eatham 🇭🇲@aussie.zone
            link
            fedilink
            English
            arrow-up
            0
            ·
            1 year ago

            How does that work?

            • starpanda@lemmy.world
              link
              fedilink
              arrow-up
              0
              ·
              1 year ago

              %0 means your current command iirc so it just reexecutes itself piping its own output to the new instances

          • FilthyShrooms@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            1 year ago

            Please I do not need this information oh god what do I do now?

            • starpanda@lemmy.world
              link
              fedilink
              arrow-up
              0
              ·
              1 year ago

              find your nearest school pc with like 8g ram

        • halva@discuss.tchncs.de
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          1 year ago

          most linux distros from android to alpine can be and often are configured to limit the amount of forks a user can spawn

      • jaybone@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        I always wonder, does it really need the pipe? Why not just :&:& ?

    • Skyhighatrist@lemmy.ca
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      It’s a fork bomb. It exponentially forks processes in the background in an attempt to consume all CPU cycles.

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 9 users / day
  • 30 users / week
  • 181 users / month
  • 1.62K users / 6 months
  • 0 local subscribers
  • 35.6K subscribers
  • 1.78K Posts
  • 36.8K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.9
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org