Run ❯
Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#Import os Library import os #Get current process group id pgid = os.getpgid(os.getpid()) #pgid greater than 0 denotes the parent group process if pgid : print("\nIn parent group process") os.killpg(pgid, 0) print("Child stopped...") else : print("In Child process") print("Process ID:", os.getpgid(os.getpid()))