This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 59cf308eff sched/taskspawn: fix spawn fail if enable FDCHECK
59cf308eff is described below
commit 59cf308eff8a307fc8f675e49a6e3b5c4a6a50c0
Author: chao an <[email protected]>
AuthorDate: Wed Nov 22 17:04:43 2023 +0800
sched/taskspawn: fix spawn fail if enable FDCHECK
protect file descriptor before compare
Signed-off-by: chao an <[email protected]>
---
fs/inode/fs_files.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c
index 8729f48e19..93ee037785 100644
--- a/fs/inode/fs_files.c
+++ b/fs/inode/fs_files.c
@@ -507,6 +507,9 @@ int files_duplist(FAR struct filelist *plist, FAR struct
filelist *clist,
if (actions != NULL)
{
+#ifdef CONFIG_FDCHECK
+ fd = fdcheck_protect(fd);
+#endif
if (!spawn_file_is_duplicateable(actions, fd, fcloexec))
{
continue;