Github user vanzin commented on a diff in the pull request: https://github.com/apache/spark/pull/20519#discussion_r167015476 --- Diff: python/pyspark/daemon.py --- @@ -79,11 +79,17 @@ def manager(): listen_sock.listen(max(1024, SOMAXCONN)) listen_host, listen_port = listen_sock.getsockname() - # re-open stdin/stdout in 'wb' mode + socket_to_parent = socket.socket(AF_INET, SOCK_STREAM) + socket_to_parent.connect(('127.0.0.1', parent_port)) + outfile = socket_to_parent.makefile(mode="wb") + write_int(token, outfile) + write_int(listen_port, outfile) + outfile.flush() + outfile.close() + socket_to_parent.close() + + # re-open stdin in 'wb' mode --- End diff -- wb?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org