Seems to me that this is only handled in the SingleNode case, not in the distributed case, am I correct?

Moreover, having the launcher know about all those contexts seems a bit ugly to me. I guess I would expect it to be more transparent (maybe by listening for some kind of close event or whatever?)