[CRIU] [PATCH] zdtm/pty02: ignore SIGHUP

Andrey Vagin avagin at openvz.org
Tue Apr 22 07:49:31 PDT 2014


The test proces opens master and slave points. The slave point becomes
the control terminal for this process. Then the test process forks a
second process and the first process closes the master point. So when a
master point is closed in a second process, the first one will be killed
by SIGHUP.

Reported-by: Victor Konyashkin <vkonyashkin at parallels.com>
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 test/zdtm/live/static/pty02.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/zdtm/live/static/pty02.c b/test/zdtm/live/static/pty02.c
index a9317d3..5bad3fc 100644
--- a/test/zdtm/live/static/pty02.c
+++ b/test/zdtm/live/static/pty02.c
@@ -81,6 +81,7 @@ int main(int argc, char *argv[])
 	test_daemon();
 	test_waitsig();
 
+	signal(SIGHUP, SIG_IGN);
 	task_waiter_complete(&t, 1);
 
 	ret = read(slave, buf, sizeof(teststr) - 1);
-- 
1.8.5.3



More information about the CRIU mailing list