bpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721)


bpo-35537, bpo-35876: Fix also test_start_new_session() of
test_subprocess: use os.getsid() rather than os.getpgid().
(cherry picked from commit 5884043252473ac733aba1d3251d4debe72511e5)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2 files changed