fork bomb

May. 26th, 2017 07:35 pm
marnanel: (Default)
[personal profile] marnanel
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!"

Date: 2017-05-26 09:58 pm (UTC)
mtbc: photograph of me (Default)
From: [personal profile] mtbc
Ha. As an undergraduate I was once sitting next to somebody who shall remain nameless who intentionally launched a fork bomb that did end up causing some system daemons to die. They had the hostname as part of their shell prompt but unfortunately for them two different machines in different domains had the same hostname hammer and they had mixed up which session was on which machine.

Date: 2017-05-26 10:50 pm (UTC)
simont: (Default)
From: [personal profile] simont
I have mercifully forgotten the poster's name, but I remember when I was at university someone made a news posting shamefacedly admitting "I accidentally fork-bombed my own machine. The program that bombed? ... A script intended to prevent fork bombs." :-)

Date: 2017-05-27 09:12 pm (UTC)
vampwillow: Yes, an 80-column tablulating card electric punch machine (cardpunch)
From: [personal profile] vampwillow
Unix happened after I'd left college ... :-(

Profile

marnanel: (Default)
Monument

July 2017

S M T W T F S
      1
2345678
91011121314 15
1617 1819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 21st, 2017 12:46 am
Powered by Dreamwidth Studios