1
0
Fork 0
forked from nuttx/nuttx-update

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 <dulibo1@xiaomi.com>
This commit is contained in:
dulibo1 2023-07-12 18:15:00 +08:00 committed by Xiang Xiao
parent ce98f186c0
commit 13c7138c8d

View file

@ -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);