You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/10/28 07:22:20 UTC
(nuttx) branch master updated: net/netconfig: Enable SOCK_CLOEXEC for all ioctl sockets
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 3fd3612e4c net/netconfig: Enable SOCK_CLOEXEC for all ioctl sockets
3fd3612e4c is described below
commit 3fd3612e4c53154131281d362fd4ab78cfaa33aa
Author: Zhe Weng <we...@xiaomi.com>
AuthorDate: Fri Oct 27 16:50:19 2023 +0800
net/netconfig: Enable SOCK_CLOEXEC for all ioctl sockets
`NET_SOCK_TYPE` is used for ioctl sockets only, they can set `O_CLOEXEC`
explicitly.
Signed-off-by: Zhe Weng <we...@xiaomi.com>
---
include/nuttx/net/netconfig.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/nuttx/net/netconfig.h b/include/nuttx/net/netconfig.h
index d6055bef13..4e3171926c 100644
--- a/include/nuttx/net/netconfig.h
+++ b/include/nuttx/net/netconfig.h
@@ -109,7 +109,7 @@
* socket for performing driver ioctls.
*/
-#define NET_SOCK_TYPE SOCK_CTRL
+#define NET_SOCK_TYPE (SOCK_CTRL | SOCK_CLOEXEC)
#if NET_SOCK_FAMILY == AF_INET
# if !defined(CONFIG_NET_UDP) && !defined(CONFIG_NET_TCP) && \