Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: third_party/pexpect/tests/needs_kill.py

Issue 1398903002: Add third_party/pexpect (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@end-to-end-test
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pexpect/tests/list100.py ('k') | third_party/pexpect/tests/pexpectTest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pexpect/tests/needs_kill.py
diff --git a/third_party/pexpect/tests/needs_kill.py b/third_party/pexpect/tests/needs_kill.py
new file mode 100644
index 0000000000000000000000000000000000000000..810236bdad60121858c58b4a4ddc99702c7b7f0d
--- /dev/null
+++ b/third_party/pexpect/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 previous file with comments | « third_party/pexpect/tests/list100.py ('k') | third_party/pexpect/tests/pexpectTest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698