Sublime Text causing computer to crash (mouse being frozen and keys not being logged) due to fork bomb

23 Views Asked by At

I tried running the following fork bomb in Python 3, designed to trawl through every directory on my computer and every file in that directory, and open all the files:

from more_itertools import collapse
from os import scandir, walk, system
from os.path import exists
for dir in set(filter(lambda item: exists(item), collapse(walk('/Users/')))):
    for entry in scandir(dir):
        try:
            system('open ' + str(entry.path))
        except:
            pass

As expected, a fair amount of random text files on my computer started opening and I was forced to reboot. However, what I did not expect was for Sublime Text 3, which I used in order to run the program, to crash after I tried to open it with any file, with random (Python and system) files opening and my screen being frozen, forcing me to manually reboot.

This issue has persisted after repeatedly rebooting my computer (strangely, Sublime Text automatically opens after I reboot and freezes my computer, leaving me a 1-second window to force quit it), and even uninstalling Sublime Text 3 and replacing it with Sublime Text 4, as well as attempting to kill Sublime Text (which appears to have a hundred windows whenever it is opened, even immediately after startup) with Terminal. Since this issue has being occurring for more than a day now, I am seriously looking into reinstalling my OS. Are there any less drastic measures I can take (preferably involving maintaining all off my files) so that I can reinstall Sublime Text?

0

There are 0 best solutions below