diff --git a/src/basic/util.c b/src/basic/util.c index 2855993afe..f845e2dabb 100644 --- a/src/basic/util.c +++ b/src/basic/util.c @@ -6143,7 +6143,7 @@ int openpt_in_namespace(pid_t pid, int flags) { if (r < 0) _exit(EXIT_FAILURE); - master = posix_openpt(flags); + master = posix_openpt(flags|O_NOCTTY|O_CLOEXEC); if (master < 0) _exit(EXIT_FAILURE);