mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
vfs/poll: correct the return event if inode has disconnect
Change-Id: I0f312a706ab1be8d8ac91b1d77cd3c1be0671457 Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -337,6 +337,13 @@ int file_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup)
|
||||
ret = OK;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fds->revents |= (POLLERR | POLLHUP);
|
||||
nxsem_post(fds->sem);
|
||||
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user