[CRIU] [PATCH 2/2] tty: Open slave peers with O_NOCTTY

Cyrill Gorcunov gorcunov at openvz.org
Tue Oct 30 03:02:46 EDT 2012


We have own mechanism to restore controlling
terminal thus we don't need the kernel to create
it in implicit way.

https://bugzilla.openvz.org/show_bug.cgi?id=2409

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 tty.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tty.c b/tty.c
index 88857b5..f087ba8 100644
--- a/tty.c
+++ b/tty.c
@@ -472,7 +472,7 @@ static int pty_open_slaves(struct tty_info *info)
 	list_for_each_entry(slave, &info->sibling, sibling) {
 		BUG_ON(pty_is_master(slave));
 
-		fd = open(pts_name, slave->tfe->flags);
+		fd = open(pts_name, slave->tfe->flags | O_NOCTTY);
 		if (fd < 0) {
 			pr_perror("Can't open slave %s", pts_name);
 			goto err;
-- 
1.7.7.6



More information about the CRIU mailing list