236
meowmeow mrowrule nyaaa (lemmy.blahaj.zone)
submitted 7 months ago by kittykittycatboys to c/196

cat imagje

you are viewing a single comment's thread
view the rest of the comments
[-] rizoid@lemmy.dbzer0.com 26 points 7 months ago

Ok but actually what does this do?

[-] groet@feddit.de 51 points 7 months ago* (last edited 7 months ago)

its a lot more readable if you replace the : with any other function name

fork() {
     fork | fork &
};
fork

define a funktion called fork, which calls itself twice (call once, pipe ( "|" ) the result to the same function again which is run in a new thread in the background ( "&" )). Then call the newly defined function. The : is used to make it look more like emoji.

load more comments (1 replies)
this post was submitted on 19 Feb 2024
236 points (100.0% liked)

196

16257 readers
2422 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS