SPARK-5964. I've raised a new ticket for a few reasons:
- alternative more minimal patch (I've not submitted a PR as I thought any discussion would be better here): https://github.com/abridgett/spark/tree/feature/add_spark_daemon_foreground
- couldn't re-open the original ticket and didn't know if a comment would suffice
There are quite a few use cases for this, e.g. when running under Mesos the shuffle service needs to be running and trying to do this under Marathon is a bit painful without this feature.
I see that there was a plan for these scripts to be rewritten in Python, however until then this would be very useful (and can feed into the rewrite as well).