we have the possibility to pass a data payload to the poller when
registering a file object. We are using this possibility to pass a
callback. the callback will either accept or handle a connection when
the read event is triggered.
while I am here make the future result asynchronous so we don't block
the I/O event handling.
this change initialise the event loop after the process has forked so we
make sure to inherit from the file descriptor.
Also fix the number of events we are waiting for. The python
implementation requires a positive number.
This module add a new cross platform event poller to gunicorn. It allows
you to listen on different fds in an efficient manner.
On linux it's using epoll, bsd/darwin kqueue...
gunicron_paster, gunicorn_django and other hacks are deprecated. This
patch only advertise gunicorn as the standard, stable and well supported
command.
This commit tries to minimize the chance of sending a kill signal
to a process that is not a gunicorn worker by reaping children
as soon as the SIGCHLD is received.
Close#371
"Limits the number of worker processes to 1" hasn't been true since
06a4dc6 (fix one error in gunicorn_paster, global conf was ignored,
2010-06-22), although it was true when the line was added in 3c7d532
(Large refactor of the documentation and website, 2010-05-22).
"changes some error handling that's sent to clients" hasn't been true
since feb86d3 (don't display the traceback in the HTTP response,
2013-09-27).
The only remaining actions that --debug had were disabling --preload
and hiding debug-level config logging. The former seems useless (just
disable --preload directly) and the latter at doesn't seem useful
enough for a new setting (just turn down --log-level). With this
commit, --preload always works and you always get debug-level config
logging.
I left a stub Debug entry in gunicorn.config, which we can leave in
place while folks convert any gunicorn scripts and configurations to
drop --debug. When the time comes, we can just remove that entry. I
also the boolean-config tests to use --preload, since that will still
be around after we remove the dummy Debug entry.
Fixes#700.