[erlang-patches] Gracefully stop emulator on Windows shutdown when run as a service

Henrik Nord henrik@REDACTED
Wed Aug 1 10:16:40 CEST 2012


Thank you for your contribution!

Patch added to 'pu' for testing


On 08/01/2012 09:53 AM, Jan Klötzke wrote:
> Hi,
>
> Currently, when running the emulator as a windows service, the emulator will
> be killed when Windows is shutting down instead of invoking the stop action
> for a graceful tear down. The following patch, based on 'maint' fixes the
> problem:
>
> git fetch git://github.com/jkloetzke/otp.git erlsrv-graceful-shutdown
>
> https://github.com/jkloetzke/otp/compare/erlsrv-graceful-shutdown
> https://github.com/jkloetzke/otp/compare/erlsrv-graceful-shutdown.patch
>
> The patch fixes erlsrv to gracefully stop the emulator on Windows shutdown.
> Windows will send the SERVICE_CONTROL_SHUTDOWN event to the service control
> handler when shutting down the system. Instead of ignoring the event, erlsrv
> will now invoke the stop action. Likewise, the Erlang emulator (and it's port
> drivers) must not quit upon reception of the CTRL_SHUTDOWN_EVENT event in the
> console control handler.
>
> Regards,
> Jan
> _____________________________________________________________________________
> PeerDrive - Beyond online storage
>
> Store, sync, backup and organize your   http://peerdrive.org
> data everywhere without relying on a    http://github.com/jkloetzke/peerdrive
> permanent network connection.
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches

-- 
/Henrik Nord Erlang/OTP




More information about the erlang-patches mailing list