pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2097200315
########## fs/vfs/fs_dup.c: ########## @@ -65,29 +65,32 @@ int file_dup(FAR struct file *filep, int minfd, int flags) uint8_t f_tag_fdcheck; /* File owner fdcheck tag, init to 0 */ #endif - fd2 = file_allocate(g_root_inode, 0, 0, NULL, minfd, true); + /* Pass the close on exec flag to file_allocate */ + + fd2 = file_allocate(g_root_inode, flags, 0, NULL, minfd, true); if (fd2 < 0) { return fd2; } ret = fs_getfilep(fd2, &filep2); #ifdef CONFIG_FDSAN - f_tag_fdsan = filep2->f_tag_fdsan; + f_tag_fdsan = nx_fcntl(fd2, NX_GETTAG_FDSAN, 0); Review Comment: I ended up removing the code, because I think it's just dead code. I'm not sure if fdsan/fdcheck work as before with this new file descriptor system, because I don't know what they're supposed to do and there is no documentation or git / commit log history that would tell me. Can someone explain shortly what they are ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org