jlai.lu
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
ɐɥO@lemmy.ohaa.xyz to linuxmemes@lemmy.world · 2 years ago

You should

lemmy.ohaa.xyz

message-square
87
link
fedilink
695

You should

lemmy.ohaa.xyz

ɐɥO@lemmy.ohaa.xyz to linuxmemes@lemmy.world · 2 years ago
message-square
87
link
fedilink
  • MonkderZweite@feddit.ch
    link
    fedilink
    arrow-up
    30
    ·
    2 years ago

    How did this one work again? It was something with piping in a backgrounded subshell, right?

    • huginn@feddit.it
      link
      fedilink
      arrow-up
      135
      ·
      2 years ago

      It creates a new process that spins up 2 new instances of itself recursively.

      https://itsfoss.com/fork-bomb/

      here's a good explanation pulled from itsfoss.com

      • KISSmyOS@lemmy.world
        link
        fedilink
        arrow-up
        38
        ·
        edit-2
        1 year ago

        deleted by creator

        • TheWoozy@lemmy.world
          link
          fedilink
          arrow-up
          15
          ·
          2 years ago

          man ulimit

      • CashewNut 🏴󠁢󠁥󠁧󠁿@lemmy.world
        link
        fedilink
        arrow-up
        10
        ·
        2 years ago

        I just did this in zsh and had to power off my machine. :(

      • MonkderZweite@feddit.ch
        link
        fedilink
        arrow-up
        8
        ·
        2 years ago

        Thanks, nice Infographic!

        • huginn@feddit.it
          link
          fedilink
          arrow-up
          2
          ·
          2 years ago

          Not mine, grabbed it from the link, but it’s a great explanation!

      • AnarchistsForDemocracy@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        edit-2
        1 year ago

        deleted by creator

        • hikaru755@feddit.de
          link
          fedilink
          arrow-up
          10
          ·
          edit-2
          2 years ago

          Maybe I’m missing something, but I think this doesn’t print or otherwise reproduce its own source code, so it’s not a quine afaict.

          • MacN'Cheezus@lemmy.today
            link
            fedilink
            arrow-up
            5
            ·
            2 years ago

            Correct. A quine is a program that prints its own source code. This one doesn’t print anything.

          • AnarchistsForDemocracy@lemmy.world
            link
            fedilink
            arrow-up
            4
            ·
            edit-2
            1 year ago

            deleted by creator

      • katy ✨@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        4
        ·
        2 years ago

        tom jones lesser known single

        • Ook the Librarian@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          2 years ago

          Goodness, gracious, fork bomb in bash

      • hexabs@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        Thanks friend. One question, is it necessary to pipe to itself? Wouldnt : & in the function body work with the same results?

        • kablammy@sh.itjust.works
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          2 years ago

          That would only add one extra process instance with each call. The pipe makes it add 2 extra processes with each call, making the number of processes grow exponentially instead of only linearly.

          Edit: Also, Im not at a computer to test this, but since the child is forked in the background (due to &), the parent is free to exit at that point, so your version would probably just effectively have 1-2 processes at a time, although the last one would have a new pid each time, so it would be impossible to get the pid and then kill it before it has already replaced itself. The original has the same “feature”, but with exponentially more to catch on each recursion. Each child would be reparented by pid 1, so you could kill them by killing pid 1 i guess (although you dont want to do that… and there would be a few you wouldn’t catch because they weren’t reparented yet)

        • itslilith@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          2 years ago

          I may be wrong, but you could use : &;: & as well, but using the pipe reduces the amount of characters by two (or three, counting whitespace)

linuxmemes@lemmy.world

linuxmemes@lemmy.world

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: !linuxmemes@lemmy.world

Hint: :q!


Sister communities:
  • !tech_memes@lemmy.world
  • !memes@lemmy.world
  • !lemmyshitpost@lemmy.world
  • !risa@startrek.website

Community rules (click to expand)

1. Follow the site-wide rules
  • Instance-wide TOS: https://legal.lemmy.world/tos/
  • Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like “every user of thing”.
  • Don’t get baited into back-and-forth insults. We are not animals.
  • Leave remarks of “peasantry” to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
4. No recent reposts
  • Everybody uses Arch btw, can’t quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
6. (NEW!) Regarding public figures

We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.

  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.

 

Please report posts and comments that break these rules!


Important: never execute code or follow advice that you don’t understand or can’t verify, especially here. The word of the day is credibility. This is a meme community – even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don’t remove France.

Visibility: Public
globe

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

  • 670 users / day
  • 3.32K users / week
  • 9.41K users / month
  • 19.4K users / 6 months
  • 109 local subscribers
  • 25.7K subscribers
  • 1.69K Posts
  • 95.6K Comments
  • Modlog
  • mods:
  • Kevin@lemmy.world
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.12
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org