mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user