Thanks for your answer, it might exactly be that Ctrl-C terminates both processes. Whether the pipe gets broken or not might even result from some race condition, that is if Winstone sends the message before the reading process terminates.I wanted to have a stop script for Winstone and used Ctrl-C as a temporary solution only. As I do not use shutdown hooks but listeners, the stop script should correct the problem.

Still, I would like to write a that terminates the whole Winstone process. It would send a shutdown message to Winstone, wait until Winstone really shuts down, and then would terminate the Winstone process. If I'd add waiting in contextDestroyed for termination of the spawned process, complete shutdown of Winstone would ensure that the process really terminated, so I could also safely terminate Winstone. Thus I have two questions:

1. Is WinstoneControl waiting for the complete shutdown before exiting?

2. If not, perhaps some alternate shutdown parameter would be helpful, that would wait for the shutdown to complete?

3. Perhaps adding exiting possibility to WinstoneControl would be helpful?

That would make such a script very easy.