pussuw commented on code in PR #16326: URL: https://github.com/apache/nuttx/pull/16326#discussion_r2076922749
########## include/nuttx/fs/fs.h: ########## @@ -462,6 +462,7 @@ struct file int f_oflags; /* Open mode flags */ #ifdef CONFIG_FS_REFCOUNT atomic_t f_refs; /* Reference count */ + sem_t f_closem; /* Free: file is fully closed */ Review Comment: > Linux implementation is correct, since POSIX spec explicitly state that: Linux man pages state this. Of course Linux man pages would describe how the Linux implementation works. The POSIX spec at https://pubs.opengroup.org/onlinepubs/9699919799/functions/dup.html is not this explicit. But I agree that the Linux implementation must be right, since POSIX says that _fd2 should *refer* to the same file description as fd1_, meaning they are the same thing, meaning our implementation is wrong. I will not fix this though, I'm trying to fix a crash, not re-write the whole file descriptor subsystem. -- 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