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:
parent
ce98f186c0
commit
13c7138c8d
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue