[CRIU] [PATCH] test/ext-tty: return an error if a child isn't killed by SIGHUP
Andrey Vagin
avagin at openvz.org
Sat Feb 13 10:06:25 PST 2016
From: Andrew Vagin <avagin at virtuozzo.com>
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
test/ext-tty/run.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/ext-tty/run.py b/test/ext-tty/run.py
index e37c260..ae0feb3 100755
--- a/test/ext-tty/run.py
+++ b/test/ext-tty/run.py
@@ -1,6 +1,6 @@
+#!/usr/bin/env python
import subprocess
-import pty
-import os, sys, time
+import os, sys, time, signal, pty
master, slave = pty.openpty()
@@ -29,7 +29,7 @@ os.waitpid(-1, os.WNOHANG) # is the process alive
os.close(new_master)
_, status = os.wait()
-if not os.WIFSIGNALED(status) or not os.WTERMSIG(status):
+if not os.WIFSIGNALED(status) or os.WTERMSIG(status) != signal.SIGHUP:
print status
sys.exit(1)
--
2.4.3
More information about the CRIU
mailing list