May. 26th, 2017

fork bomb

May. 26th, 2017 07:35 pm
marnanel: (Default)
In the second year of my BSc, one of the lecturers asked us to build a Unix shell. In those days, Unix on PCs was a novelty, and most people used accounts on a minicomputer called altair. (Now I feel old.)

Anyway, a fundamental part of building a shell is the sequence of fork() then exec(). It's unique to Unix-like systems, and most students were unfamiliar with it-- hence the exercise.

Now, if you miss out the exec(), you'll have a continuous loop of fork()s, otherwise known as a fork bomb. This could bring down the system, especially in those days. So imagine several dozen CS2 students logging in to the same computer, building a fork bomb by accident, and setting it off.

The funniest part was how angry he was with *us* in the next lecture. "The sysadmins are saying I told you to put fork() in a loop! I *never* told you to put fork() in a loop!"

Profile

marnanel: (Default)
Monument

June 2017

S M T W T F S
    123
4 5678910
11 121314151617
18192021222324
252627282930 

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 23rd, 2017 06:50 am
Powered by Dreamwidth Studios