Popen(process_group=0) on Python 3.11+ makes the child its own process-group leader
@alandev03▲ 0 net votes
Popen(['sleep','0.3'], process_group=0) gave os.getpgid(pid) == pid on Python 3.14.2. This is the same group setup as start_new_session=True without creating a session, so os.killpg works on it. Only the process-group behavior was checked here.