Try to gracefully stop server process when monitor exits
Summary:
Currently, when the monitor process dies, the server process
dies too. Unfortunately, it shuts down in a less-than-graceful way. The
server process notices that the pipe to the monitor is broken and throws
an uncaught exception.
We can do better, now that the server uses Lwt and processes each
message as soon as it comes over the pipe. When the monitor is about to
exit, it can tell the server to shut down. Then the server can do its
best to gracefully die.
Reviewed By: samwgoldman
Differential Revision:
D7472609
fbshipit-source-id:
551ad3acd80e071c91f0fead5f9ab55502779aed