diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-27 10:54:27 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-27 10:55:07 +0100 |
commit | 91515f2995f87befae5816840a0684ffc7297980 (patch) | |
tree | 52b2a3e38d4e6504c22ae89e0c6cc06d7f9d7541 /src/rspamd.c | |
parent | fb43436a5cd82158485ea0763c4b1dad29888be6 (diff) | |
download | rspamd-91515f2995f87befae5816840a0684ffc7297980.tar.gz rspamd-91515f2995f87befae5816840a0684ffc7297980.zip |
[Fix] Use non-blocking mode for systemd sockets
Issue: #430
Reported by: @Twilek-de
Diffstat (limited to 'src/rspamd.c')
-rw-r--r-- | src/rspamd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rspamd.c b/src/rspamd.c index cb8eb1806..8757f07e5 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -405,9 +405,13 @@ systemd_get_socket (struct rspamd_main *rspamd_main, gint number) return NULL; } flags = fcntl (sock, F_GETFD); + if (flags != -1) { (void)fcntl (sock, F_SETFD, flags | FD_CLOEXEC); } + + rspamd_socket_nonblocking (sock); + result = g_list_prepend (result, GINT_TO_POINTER (sock)); } else if (num_passed <= number) { |