Author Topic: Who can tell me what this does?  (Read 5376 times)

0 Members and 1 Guest are viewing this topic.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Who can tell me what this does?
« Reply #15 on: August 19, 2005, 03:34:43 pm »
Quote
Code:
while (1) {
  fork();
}

Can I do it yet? =)

That's basically what it does, but how?

He won't know unless he can find the log of me explaining it to him last night ;P

Haha, I didn't think he'd figure that out himself :)

To quote somebody else:
Quote
The ':()' defines a fuction ':' with a fuction body of
{
 : | : &
}

As you can see this is a recursive call as the fuction ':' is called,
it's output passed via a pipe as input to the fuction ':' and this
whole command is run in the background '&' .

The last ':' in the string (after the ';') calls the fuction and therefore
starts it all of.

(Krazed edit: Disabled smileys.)
« Last Edit: August 21, 2005, 08:38:35 am by Krazed »