summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2014-11-23 15:18:58 -0800
committerJeff Quast <contact@jeffquast.com>2014-11-23 15:18:58 -0800
commit79d856b598c1755e3f6cf8d7dd5ce8d19afa02bc (patch)
tree9f2be51c628bbbda21da99694290dbd54b80125c
parent2c5192daff1d45b4bb3d0235abf9c54a1b90c691 (diff)
downloadpexpect-propose-more-reliable-terminate.tar.gz
add SIGCONT and use select, not time.sleeppropose-more-reliable-terminate
-rwxr-xr-xtests/needs_kill.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/needs_kill.py b/tests/needs_kill.py
index 9f44603..596b60a 100755
--- a/tests/needs_kill.py
+++ b/tests/needs_kill.py
@@ -1,12 +1,14 @@
#!/usr/bin/env python
"""This script can only be killed by SIGKILL."""
import signal
-import time
+import select
# Ignore interrupt, hangup and continue signals - only SIGKILL will work
signal.signal(signal.SIGINT, signal.SIG_IGN)
signal.signal(signal.SIGHUP, signal.SIG_IGN)
+signal.signal(signal.SIGCONT, signal.SIG_IGN)
signal.signal(signal.SIGTERM, signal.SIG_IGN)
+select.select([], [], [], 1)
print('READY')
-time.sleep(60)
+select.select([], [], [], 60)