Skip to content

Commit afcffea

Browse files
committed
Fix style (minor)
1 parent 72004c2 commit afcffea

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

python/pyspark/java_gateway.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ def preexec_func():
7777
# with any opportunity to read an EOF from the parent. Note that this is only best
7878
# effort and will not take effect if the python process is violently terminated.
7979
if on_windows:
80-
# In Windows, the child process here is "spark-submit.cmd", not the JVM itself
81-
# (because the UNIX "exec" command is not available). This means we cannot simply
82-
# call proc.kill(), which kills only the "spark-submit.cmd" process but not the
83-
# JVMs. Instead, we use "taskkill" with the tree-kill option "/t" to terminate all
84-
# child processes.
85-
def killChild():
86-
Popen(["cmd", "/c", "taskkill", "/f", "/t", "/pid", str(proc.pid)])
87-
atexit.register(killChild)
80+
# In Windows, the child process here is "spark-submit.cmd", not the JVM itself
81+
# (because the UNIX "exec" command is not available). This means we cannot simply
82+
# call proc.kill(), which kills only the "spark-submit.cmd" process but not the
83+
# JVMs. Instead, we use "taskkill" with the tree-kill option "/t" to terminate all
84+
# child processes.
85+
def killChild():
86+
Popen(["cmd", "/c", "taskkill", "/f", "/t", "/pid", str(proc.pid)])
87+
atexit.register(killChild)
8888

8989
# Create a thread to echo output from the GatewayServer, which is required
9090
# for Java log output to show up:

0 commit comments

Comments
 (0)