diff --git a/teuthology/task/install/bin/stdin-killer b/teuthology/task/install/bin/stdin-killer index 8a78744a3..d5ff230b2 100755 --- a/teuthology/task/install/bin/stdin-killer +++ b/teuthology/task/install/bin/stdin-killer @@ -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