← go back
Just testing some code
from threading import Thread
from time import sleep
import os
def commit_suicide():
print("Process", os.getpid(), "out", flush=True)
sleep(0.5)
os.kill(os.getpid(), 15)
thread = Thread(target=commit_suicide)
# go commit die
thread.start()
sleep(1)
print("I am immortal")
Nov 4, 2023, 1:25 PM
(edited)
4 0 0
Comments