Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/3274#discussion_r20398164
--- Diff: python/pyspark/java_gateway.py ---
@@ -45,7 +45,9 @@ def launch_gateway():
# Don't send ctrl-c / SIGINT to the Java gateway:
def preexec_func():
signal.signal(signal.SIGINT, signal.SIG_IGN)
- proc = Popen(command, stdout=PIPE, stdin=PIPE,
preexec_fn=preexec_func)
+ env = dict(os.environ)
+ env["PYSPARK"] = "1" # tell JVM to exit after python exits
--- End diff --
Sorry, I missed this case. Actually not all pyspark applications should go
through this path. I think we should rename this variable to
`IS_PYTHON_SUBPROCESS` on second thought:
```
env["IS_PYTHON_SUBPROCESS"] = "1" # Tell JVM to exit after python exits
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]