kanaka/websockify — pull request #98 by alonbl (2013-10-14 18:31:12+00:00)
Title: Minor API cleanups

Hello,

As websocket is API that may be used by other projects, it may be cleaned up to provide a better service.

1. Support SIGTERM so that front-end process can be terminated normally as well, good for systemd like service that executed in the foreground.

2. Restore signals that are being altered.

3. Avoid exiting in the middle of process.

These are minimal changes, better to have the library to allow registering termination hook, and main to handle signals, but until then, I suggest to add these minimal changes.

Thanks!