Skip to content

Commit

Permalink
stdin-killer: do not setpgrp is already leader
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Donnelly <[email protected]>
  • Loading branch information
batrick committed Aug 4, 2023
1 parent ce5f6d5 commit 5b58504
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion teuthology/task/install/bin/stdin-killer
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ if __name__ == "__main__":
}

if NS.setpgrp == "self":
os.setpgrp()
pgrp = os.getpgrp()
if pgrp != os.getpid():
os.setpgrp()
pgrp = os.getpgrp()
elif NS.setpgrp == "child":
popen_kwargs["preexec_fn"] = os.setpgrp
pgrp = None
Expand Down

0 comments on commit 5b58504

Please sign in to comment.