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 c3ccc30f83 wireless: enable O_CLOEXEC explicit
c3ccc30f83 is described below

commit c3ccc30f83c1ae9eb341821fb98f0eac06989fa7
Author: wanggang26 <[email protected]>
AuthorDate: Wed Sep 13 20:37:19 2023 +0800

    wireless: enable O_CLOEXEC explicit
    
    Signed-off-by: wanggang26 <[email protected]>
---
 wireless/bluetooth/bt_conn.c    | 2 +-
 wireless/bluetooth/bt_hcicore.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/wireless/bluetooth/bt_conn.c b/wireless/bluetooth/bt_conn.c
index ec1669490d..fbb1a0dc61 100644
--- a/wireless/bluetooth/bt_conn.c
+++ b/wireless/bluetooth/bt_conn.c
@@ -559,7 +559,7 @@ void bt_conn_set_state(FAR struct bt_conn_s *conn,
         {
           int ret;
 
-          ret = bt_queue_open(BT_CONN_TX, O_RDWR | O_CREAT,
+          ret = bt_queue_open(BT_CONN_TX, O_RDWR | O_CREAT | O_CLOEXEC,
                               CONFIG_BLUETOOTH_TXCONN_NMSGS,
                               &conn->tx_queue);
           DEBUGASSERT(ret >= 0);
diff --git a/wireless/bluetooth/bt_hcicore.c b/wireless/bluetooth/bt_hcicore.c
index 9b8595787d..1d95f0ea1b 100644
--- a/wireless/bluetooth/bt_hcicore.c
+++ b/wireless/bluetooth/bt_hcicore.c
@@ -1504,7 +1504,7 @@ static void cmd_queue_init(void)
    * the Tx queue and received by logic on the Tx kernel thread.
    */
 
-  ret = bt_queue_open(BT_HCI_TX, O_RDWR | O_CREAT,
+  ret = bt_queue_open(BT_HCI_TX, O_RDWR | O_CREAT | O_CLOEXEC,
                       CONFIG_BLUETOOTH_TXCMD_NMSGS, &g_btdev.tx_queue);
   DEBUGASSERT(ret >= 0);
 

Reply via email to