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 <weng...@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 <weng...@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) && \

Reply via email to