| Index: handler/mac/exception_handler_server.h
|
| diff --git a/handler/mac/exception_handler_server.h b/handler/mac/exception_handler_server.h
|
| index 05c4056fe19a41e2fb933422b503edeafac5735f..df9d5a0d0dcc3d5af620ef2f10692b239f203887 100644
|
| --- a/handler/mac/exception_handler_server.h
|
| +++ b/handler/mac/exception_handler_server.h
|
| @@ -32,20 +32,26 @@ class ExceptionHandlerServer {
|
| //!
|
| //! \param[in] receive_port The port that exception messages and no-senders
|
| //! notifications will be received on.
|
| - explicit ExceptionHandlerServer(
|
| - base::mac::ScopedMachReceiveRight receive_port);
|
| + //! \param[in] launchd If `true`, the exception handler is being run from
|
| + //! launchd. \a receive_port is not monitored for no-senders
|
| + //! notifications, and instead, the expected “quit” signal is receipt of
|
| + //! `SIGTERM`.
|
| + ExceptionHandlerServer(base::mac::ScopedMachReceiveRight receive_port,
|
| + bool launchd);
|
| ~ExceptionHandlerServer();
|
|
|
| //! \brief Runs the exception-handling server.
|
| //!
|
| //! \param[in] exception_interface An object to send exception messages to.
|
| //!
|
| - //! This method monitors the receive port for exception messages and
|
| - //! no-senders notifications. It continues running until it has no more
|
| - //! clients, indicated by the receipt of a no-senders notification. It is
|
| - //! important to assure that a send right exists in a client (or has been
|
| - //! queued by `mach_msg()` to be sent to a client) prior to calling this
|
| - //! method, or it will detect that it is sender-less and return immediately.
|
| + //! This method monitors the receive port for exception messages and, if
|
| + //! not being run by launchd, no-senders notifications. It continues running
|
| + //! until it has no more clients, indicated by the receipt of a no-senders
|
| + //! notification, or if being run by launchd, receipt of `SIGTERM`. When not
|
| + //! being run by launchd, it is important to assure that a send right exists
|
| + //! in a client (or has been queued by `mach_msg()` to be sent to a client)
|
| + //! prior to calling this method, or it will detect that it is sender-less and
|
| + //! return immediately.
|
| //!
|
| //! All exception messages will be passed to \a exception_interface.
|
| //!
|
| @@ -59,6 +65,7 @@ class ExceptionHandlerServer {
|
|
|
| private:
|
| base::mac::ScopedMachReceiveRight receive_port_;
|
| + bool launchd_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerServer);
|
| };
|
|
|