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:
Zhe Weng
2023-12-04 15:34:48 +08:00
committed by Xiang Xiao
parent c17fcb5ddd
commit bffe858e47
3 changed files with 43 additions and 13 deletions
+17
View File
@@ -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
*