summaryrefslogtreecommitdiffstats
path: root/lldb/third_party/Python/module/pexpect-4.6/tests/needs_kill.py
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2019-03-12 20:41:24 +0000
committerDavide Italiano <davide@freebsd.org>2019-03-12 20:41:24 +0000
commit205fd03a27dcf1649f4facaf8d80d219e2937d9d (patch)
tree59e5ddf3f860f20b05a9b4b043b26c0eabb5840b /lldb/third_party/Python/module/pexpect-4.6/tests/needs_kill.py
parente2b8c40a7726806557fb17666478e60ada1c7439 (diff)
downloadbcm5719-llvm-205fd03a27dcf1649f4facaf8d80d219e2937d9d.tar.gz
bcm5719-llvm-205fd03a27dcf1649f4facaf8d80d219e2937d9d.zip
[third-party] Update pexpect to 4.6.
Reviewers: labath, jdevlieghere Subscribers: lldb-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59159 llvm-svn: 355967
Diffstat (limited to 'lldb/third_party/Python/module/pexpect-4.6/tests/needs_kill.py')
-rwxr-xr-xlldb/third_party/Python/module/pexpect-4.6/tests/needs_kill.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/third_party/Python/module/pexpect-4.6/tests/needs_kill.py b/lldb/third_party/Python/module/pexpect-4.6/tests/needs_kill.py
new file mode 100755
index 00000000000..810236bdad6
--- /dev/null
+++ b/lldb/third_party/Python/module/pexpect-4.6/tests/needs_kill.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+"""This script can only be killed by SIGKILL."""
+import signal, time
+
+# 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)
+
+print('READY')
+while True:
+ time.sleep(10)
+ \ No newline at end of file
OpenPOWER on IntegriCloud