Commit aa40501d authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

test/ext-tty: return an error if a child isn't killed by SIGHUP

Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent d55a1fdd
#!/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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment