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/07/12 17:06:58 UTC
[nuttx] branch master updated: add refcnt using epoll_create to fix bug when use popen which dup the fd and close at end after epoll_create
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 13c7138c8d add refcnt using epoll_create to fix bug when use popen which dup the fd and close at end after epoll_create
13c7138c8d is described below
commit 13c7138c8d08a0f1a5346eda671cf501ba0121a4
Author: dulibo1 <du...@xiaomi.com>
AuthorDate: Wed Jul 12 18:15:00 2023 +0800
add refcnt using epoll_create to fix bug when use popen which dup the fd and close at end after epoll_create
Signed-off-by: dulibo1 <du...@xiaomi.com>
---
fs/vfs/fs_epoll.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/vfs/fs_epoll.c b/fs/vfs/fs_epoll.c
index b5085bfc0b..e599200f46 100644
--- a/fs/vfs/fs_epoll.c
+++ b/fs/vfs/fs_epoll.c
@@ -246,6 +246,8 @@ static int epoll_do_create(int size, int flags)
list_add_tail(&eph->free, &epn[i].node);
}
+ eph->crefs++;
+
/* Alloc the file descriptor */
fd = file_allocate(&g_epoll_inode, flags, 0, eph, 0, true);