When setting up the Mojo IPC between Chrome and the Chrome Cleaner process, a call is made to mojo::edk::OutgoingBrokerClientInvitation::Send(), which optionally takes a process error callback. That callback is called if Mojo rejects a message from a process, but does not otherwise indicate anything else. In particular it does not indicate that the pipe is broken or that the process has terminated.
The process error callback can be dispatched from any thread at any time (even after a connection error has been dispatched to indicate that the pipe is broken) so it is kind of hard to deal with.
On the other hand, it might be worth investigating if it could be useful somehow. For example, should we try to close the pipe if it is still up and running and we recieve a process error callback indicating that a message has been rejected?
Comment 1 by alito@chromium.org
, Nov 6 2017