[SPARK-11463] [PYSPARK] only install signal in main thread
[SPARK-11463] [PYSPARK] only install signal in main thread

Only install signal in main thread, or it will fail to create context in not-main thread.

Author: Davies Liu <davies@databricks.com>

Closes #9574 from davies/python_signal.

(cherry picked from commit bd70244b3cda62cc447fd4cc343d4eb5ddaec893)
Signed-off-by: Davies Liu <399a71a219a2bbf15a9ad52c797d50eb921e7e28@gmail.com>

haowu80s/spark,haowu80s/spark,haowu80s/spark,haowu80s/spark,haowu80s/spark,haowu80s/spark