mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
tty: open tty-s with O_NOCTTY
When we open tty, we don't want to set it as controlling terminal. [xemul: We do it in all the other places, this one is forgotten. The "controlling tty" feature is setup explicitly later with the ioctl (TIOCSCTTY) call. ] This bug was caught by pty04. Where we get unexpected SIGCONT, which is sent after closing a controlling terminal. ./pty04 --pidfile=pty04.pid --outfile=pty04.out Dump 9578 Restore Test: zdtm/live/static/pty04, Result: FAIL ==================================== ERROR ==================================== Test: zdtm/live/static/pty04, Namespace: Dump log : /home/jenkins/workspace/Rpi-CRIU/test/dump/static/pty04/9578/1/dump.log --------------------------------- grep Error --------------------------------- ------------------------------------- END ------------------------------------- Restore log: /home/jenkins/workspace/Rpi-CRIU/test/dump/static/pty04/9578/1/restore.log --------------------------------- grep Error --------------------------------- (00.083420) Error (cr-restore.c:1092): 9578 killed by signal 0 (00.083708) Error (cr-restore.c:1713): Restoring FAILED. ------------------------------------- END ------------------------------------- ================================= ERROR OVER ================================= Reported-by: Mr Jenkins Signed-off-by: Andrey Vagin <avagin@openvz.org> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
994ae676b4
commit
bff466c291
1 changed files with 1 additions and 1 deletions
2
tty.c
2
tty.c
|
|
@ -557,7 +557,7 @@ static int pty_open_unpaired_slave(struct file_desc *d, struct tty_info *slave)
|
|||
|
||||
unlock_pty(master);
|
||||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue