Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from multiprocessing import Process
- def checking(process):
- #codes here
- #return 1 if the process is still running, 0 if the process isn't
- def a():
- while 1: pass
- process = Process(target=a)
- process.start()
- checking(process) #return 1
- process.terminate()
- checking(process) #return 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement