Python Madness - Crash your computer in just 3 lines of code
So a coworker mentioned he wanted a file that would launch multiple programs for him. Being helpful like I am, I whipped up a quick Python script:
import os
os.startfile(”C:\Program Files\IrfanView\i_view32.exe”)
os.startfile(”C:\Program Files\Google\Google Talk\googletalk.exe”)
#…etc
I sent it off to him and he was happy. But being curious as I am, I decided to make the script call itself and see what would happen…
File: startfiles.py
import os
os.startfile(”startfiles.py”)
os.startfile(”startfiles.py”)
Warning, save all your work on your computer before you try running this!
And here are my results: (can you beat my 258 processes?)
–







September 20th, 2005 at 1:19 pm
You can do this in c too by recursively calling fork()
September 21st, 2005 at 6:38 am
This is the equivalent of the old unix classic fork bomb:
#!/bin/sh
$0 & $0
June 18th, 2007 at 5:08 pm
Hmm, to bad this didn’t crash my computer. I guess I have to much memory.
June 18th, 2007 at 6:41 pm
Uchi, what happened? Did your computer at least slow down to the point where you couldn’t use it?
December 6th, 2007 at 4:58 pm
Computer Maintenance Tips…
I couldn’t understand some parts of this article, but it sounds interesting…