summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/basic/util.c2
1 files changed, 1 insertions, 1 deletions
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);