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 ... :-(


marnanel: (Default)

September 2017

1718192021 2223

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 24th, 2017 01:29 am
Powered by Dreamwidth Studios