mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 10:32:47 +08:00
fs/proc: Fix groupfd to get fd by group instead of current tcb
/proc/<pid>/group/fd should read the fds of <pid>, not current tcb. Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
@@ -882,6 +882,23 @@ int files_duplist(FAR struct filelist *plist, FAR struct filelist *clist,
|
||||
FAR const posix_spawn_file_actions_t *actions,
|
||||
bool cloexec);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: files_fget
|
||||
*
|
||||
* Description:
|
||||
* Get the instance of struct file from file list by file descriptor.
|
||||
*
|
||||
* Input Parameters:
|
||||
* list - The list of files for a task.
|
||||
* fd - A valid descriptor between 0 and files_countlist(list).
|
||||
*
|
||||
* Returned Value:
|
||||
* Pointer to file structure of list[fd].
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct file *files_fget(FAR struct filelist *list, int fd);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: file_allocate_from_tcb
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user