From 5f819dc68a54c5227a47812f383de3644da1ded4 Mon Sep 17 00:00:00 2001 From: Gao feng Date: Tue, 29 Sep 2015 10:06:36 +0800 Subject: [PATCH] close slaver tty fd for container Signed-off-by: Gao feng --- src/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exec.c b/src/exec.c index ae88c6e..ea45fd0 100644 --- a/src/exec.c +++ b/src/exec.c @@ -132,7 +132,7 @@ int hyper_setup_exec_tty(struct hyper_exec *e) return -1; } - e->ptyfd = open(ptmx, O_RDWR | O_NOCTTY); + e->ptyfd = open(ptmx, O_RDWR | O_NOCTTY | O_CLOEXEC); fprintf(stdout, "get pty device for exec %s\n", ptmx); return 0;