context deprecation
authorAndy Green <andy@warmcat.com>
Thu, 15 Dec 2016 23:37:43 +0000 (07:37 +0800)
committerAndy Green <andy@warmcat.com>
Tue, 20 Dec 2016 06:37:07 +0000 (14:37 +0800)
commitbe9fb919d145d662d7a2ed4ae8e6912f75937449
tree13f97c6e266834d01fe15daf24d839709bb8ed02
parent0a3859f62325d22d96cda95513c99668823aea52
context deprecation

1) This makes lwsws run a parent process with the original permissions.
But this process is only able to respond to SIGHUP, it doesn't do anything
else.

2) You can send this parent process a SIGHUP now to cause it to

 - close listening sockets in existing lwsws processes

 - mark those processes as to exit when the number of active connections
   on the falls to zero

 - spawn a fresh child process from scratch, using latest configuration
   file content, latest plugins, etc.  It can now reopen listening sockets
   if it chooses to, or open different listen ports or whatever.

Notes:

1) lws_context_destroy() has been split into two pieces... the reason for
the split is the first part closes the per-vhost protocols, but since
they may have created libuv objects in the per-vhost protocol storage,
these cannot be freed until after the loop has been run.

That's the purpose of the second part of the context destruction,
lws_context_destroy2().

For compatibility, if you are not using libuv, the first part calls the
second part.  However if you are using libuv, you must now call the
second part from your own main.c after the first part.
44 files changed:
README.lwsws.md
doc/html/globals_func.html
doc/html/globals_l.html
doc/html/group__client.html
doc/html/group__context-and-vhost.html
doc/html/group__context-and-vhost.js
doc/html/group__form-parsing.html
doc/html/group__sending-data.html
doc/html/group__smtp.html
doc/html/group__uv.html
doc/html/group__vhost-mounts.html
doc/html/index.html
doc/html/libwebsockets_8h.html
doc/html/libwebsockets_8h.js
doc/html/libwebsockets_8h_source.html
doc/html/md_README_8lwsws.html
doc/html/navtreedata.js
doc/html/navtreeindex0.js
doc/html/navtreeindex1.js
doc/html/navtreeindex2.js
doc/html/navtreeindex3.js
doc/html/navtreeindex4.js
lib/context.c
lib/daemonize.c
lib/lejp-conf.c
lib/libuv.c
lib/libwebsockets.c
lib/libwebsockets.h
lib/lws-plat-unix.c
lib/lws-plat-win.c
lib/pollfd.c
lib/private-libwebsockets.h
lib/server.c
lib/service.c
lib/smtp.c
lib/ssl.c
lwsws/main.c
lwsws/usr-lib-systemd-system-lwsws.service
mainpage.md
plugins/generic-sessions/private-lwsgs.h
plugins/generic-sessions/protocol_generic_sessions.c
plugins/protocol_dumb_increment.c
plugins/protocol_lws_server_status.c
plugins/server-status.html