diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-30 02:45:01 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-30 02:45:01 +0200 |
commit | 36f9d70182c4c2f2e617192ae34abd6c44549a78 (patch) | |
tree | bcc78e6b4cd4c24e0e702855bf8e87605490fcdd /src/fastd.h | |
parent | 9a86ce6ea990ac72337bffb78f663f8a904a408f (diff) | |
download | fastd-36f9d70182c4c2f2e617192ae34abd6c44549a78.tar fastd-36f9d70182c4c2f2e617192ae34abd6c44549a78.zip |
shell: close all fds > 2 after forking
socket/fcntl to set FD_CLOEXEC isn't thread-safe with async verify handlers,
and SOCK_CLOEXEC isn't portable.
Diffstat (limited to 'src/fastd.h')
-rw-r--r-- | src/fastd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fastd.h b/src/fastd.h index 73c7229..2654bfd 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -306,6 +306,8 @@ void fastd_receive(fastd_socket_t *sock); void fastd_handle_receive(fastd_peer_t *peer, fastd_buffer_t buffer); +void fastd_close_all_fds(void); + bool fastd_socket_handle_binds(void); fastd_socket_t* fastd_socket_open(fastd_peer_t *peer, int af); void fastd_socket_close(fastd_socket_t *sock); |