RTEMS | fcntl(F_DUP2FD) onto a free descriptor yields a dead descriptor and leaves its iop on the free list (#5670)

Joel Sherrill (@joel) gitlab at rtems.org
Sat Aug 1 19:28:50 UTC 2026




Joel Sherrill commented: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5670#note_156332


@chris and I chatted about this. I went digging into the POSIX standard versions to see what they said and when. This requirement on the file descriptor number is a recent change from what I see in the published PDFs. As recently as POSIX Issue 7 (2013), this was the text:

> F_DUPFD Duplicate file descriptor.

It was still that way in a 2021 draft of POSIX Issue 8 (2024). But in the online HTML for Issue 6 (2004), it has the new text.

I am happy seeing this change. But the POSIX history on its addition is odd.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5670#note_156332
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/4-4f4x71m7nu7wfz3ggv1m6ulra-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260801/a824b510/attachment.htm>


More information about the bugs mailing list