mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
sched/taskspawn: fix spawn fail if enable FDCHECK
protect file descriptor before compare Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user