mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
help systemd by not calling shutdown() on listen socket if MHD_USE_PIPE_FOR_SHUTDOWN is given
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
Tue Sep 22 19:17:54 CEST 2015
|
||||
Do not use shutdown() on listen socket if MHD_USE_PIPE_FOR_SHUTDOWN
|
||||
is set. -CG
|
||||
|
||||
Wed Sep 16 11:06:02 CEST 2015
|
||||
Releasing libmicrohttpd 0.9.43. -CG
|
||||
|
||||
|
||||
@@ -542,6 +542,10 @@ use of this option is automatic (as in, you do not even have to
|
||||
specify it), if @code{MHD_USE_NO_LISTEN_SOCKET} is specified. In
|
||||
"external" select mode, this option is always simply ignored.
|
||||
|
||||
Using this option also guarantees that MHD will not call
|
||||
@code{shutdown()} on the listen socket, which means a parent
|
||||
process can continue to use the socket.
|
||||
|
||||
@item MHD_USE_SUSPEND_RESUME
|
||||
Enables using @code{MHD_suspend_connection} and
|
||||
@code{MHD_resume_connection}, as performing these calls requires some
|
||||
|
||||
@@ -130,7 +130,7 @@ typedef intptr_t ssize_t;
|
||||
* Current version of the library.
|
||||
* 0x01093001 = 1.9.30-1.
|
||||
*/
|
||||
#define MHD_VERSION 0x00094300
|
||||
#define MHD_VERSION 0x00094301
|
||||
|
||||
/**
|
||||
* MHD-internal return code for "YES".
|
||||
|
||||
@@ -2223,7 +2223,7 @@ MHD_run_from_select (struct MHD_Daemon *daemon,
|
||||
struct MHD_Connection *next;
|
||||
unsigned int mask = MHD_USE_SUSPEND_RESUME | MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY |
|
||||
MHD_USE_SELECT_INTERNALLY | MHD_USE_POLL_INTERNALLY | MHD_USE_THREAD_PER_CONNECTION;
|
||||
|
||||
|
||||
/* Resuming external connections when using an extern mainloop */
|
||||
if (MHD_USE_SUSPEND_RESUME == (daemon->options & mask))
|
||||
resume_suspended_connections (daemon);
|
||||
@@ -4500,7 +4500,8 @@ MHD_stop_daemon (struct MHD_Daemon *daemon)
|
||||
else
|
||||
{
|
||||
/* fd might be MHD_INVALID_SOCKET here due to 'MHD_quiesce_daemon' */
|
||||
if (MHD_INVALID_SOCKET != fd)
|
||||
if ( (MHD_INVALID_SOCKET != fd) &&
|
||||
(0 == (daemon->options & MHD_USE_PIPE_FOR_SHUTDOWN)) )
|
||||
(void) shutdown (fd, SHUT_RDWR);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user