HN2new | past | comments | ask | show | jobs | submitlogin

You could really be a jerk and do this...

    while true

        try:
            os.fork()

        except Exception as e:
            continue


Change 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.


or "except BaseException"


But 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").


> 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?)...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: