diff options
| author | Andreas Schneider <asn@samba.org> | 2013-12-19 14:29:52 +0100 |
|---|---|---|
| committer | Andreas Schneider <asn@samba.org> | 2013-12-19 14:29:52 +0100 |
| commit | b9b05b13d2731fa287fed5ffb602844828e3bb50 (patch) | |
| tree | 044add52241b47fd092ba5b72cbb20ce2004b104 /src | |
| parent | 3c3b7f69d283fc6407a146b412df00517e500b01 (diff) | |
| download | socket_wrapper-b9b05b13d2731fa287fed5ffb602844828e3bb50.tar.gz socket_wrapper-b9b05b13d2731fa287fed5ffb602844828e3bb50.tar.xz socket_wrapper-b9b05b13d2731fa287fed5ffb602844828e3bb50.zip | |
swrap: Add documentation for SOCK_CLOEXEC in socket().
Diffstat (limited to 'src')
| -rw-r--r-- | src/socket_wrapper.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 0fcdb99..62e83ef 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -1929,6 +1929,12 @@ static int swrap_socket(int family, int type, int protocol) struct socket_info_fd *fi; int fd; int real_type = type; + + /* + * Remove possible addition flags passed to socket() so + * do not fail checking the type. + * See https://lwn.net/Articles/281965/ + */ #ifdef SOCK_CLOEXEC real_type &= ~SOCK_CLOEXEC; #endif |
