summaryrefslogtreecommitdiffstats
path: root/lldb/third_party/Python/module/pexpect-4.6/tests/needs_kill.py
diff options
context:
space:
mode:
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