4 ms·
You could really be a jerk and do this... while true try: os.fork() except Exception as e: continue
by zer0faith 7y ago
You could really be a jerk and do this...
while true
try:
os.fork()
except Exception as e:
continue
- dylanfw 7y agoChange that `except Exception:` to just a bare `except:` to catch KeyboardInterrupts as well and prevent Ctrl+C from killing any of them while it expands.
- aldanor 7y agoor "except BaseException"
- deleted 7y ago[deleted]
- zeta0x10 7y agoBut what's your point? You can also be a jerk and do $ cat nice.sh rm -rf $HOME $ In the end the user trusts the program/script to not be harmful. That's why we have the browser platform (which shields programs (aka web apps) from the local file system) and advanced permission management in the popular app stores ("this app wants to access your local file system").
- inetknght 7y ago> That's why we have the browser platform (which shields programs (aka web apps) from the local file system) and advanced permission management in the popular app stores ("this app wants to access your local file system"). Don't tell browsers that. Javascript hooks for everything, from your clipboard (hope you don't use a password manager), to Bluetooth (oh you like screaming in your music?), and even your USB devices (is your $HOME mounted over USB?)...