You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by da...@apache.org on 2015/12/07 20:00:30 UTC
spark git commit: [SPARK-12132] [PYSPARK] raise KeyboardInterrupt
inside SIGINT handler
Repository: spark
Updated Branches:
refs/heads/master 39d677c8f -> ef3f047c0
[SPARK-12132] [PYSPARK] raise KeyboardInterrupt inside SIGINT handler
Currently, the current line is not cleared by Cltr-C
After this patch
```
>>> asdfasdf^C
Traceback (most recent call last):
File "~/spark/python/pyspark/context.py", line 225, in signal_handler
raise KeyboardInterrupt()
KeyboardInterrupt
```
It's still worse than 1.5 (and before).
Author: Davies Liu <da...@databricks.com>
Closes #10134 from davies/fix_cltrc.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/ef3f047c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/ef3f047c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/ef3f047c
Branch: refs/heads/master
Commit: ef3f047c07ef0ac4a3a97e6bc11e1c28c6c8f9a0
Parents: 39d677c
Author: Davies Liu <da...@databricks.com>
Authored: Mon Dec 7 11:00:25 2015 -0800
Committer: Davies Liu <da...@gmail.com>
Committed: Mon Dec 7 11:00:25 2015 -0800
----------------------------------------------------------------------
python/pyspark/context.py | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/ef3f047c/python/pyspark/context.py
----------------------------------------------------------------------
diff --git a/python/pyspark/context.py b/python/pyspark/context.py
index 77710a1..529d16b 100644
--- a/python/pyspark/context.py
+++ b/python/pyspark/context.py
@@ -222,6 +222,7 @@ class SparkContext(object):
# create a signal handler which would be invoked on receiving SIGINT
def signal_handler(signal, frame):
self.cancelAllJobs()
+ raise KeyboardInterrupt()
# see http://stackoverflow.com/questions/23206787/
if isinstance(threading.current_thread(), threading._MainThread):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org