Implement Functionality Currently Missing in dup

Wei Shen cquark at gmail.com
Mon Mar 24 16:01:23 UTC 2008


Hi Joel,

Thanks for the long reply.

On 3/24/08, Joel Sherrill <joel.sherrill at oarcorp.com> wrote:

> > (2) fcntl with F_DUPFD should try to find "a new file descriptor which
> > shall be the lowest numbered available (that is, not already open)
> > file descriptor greater than or equal to the third argument".
> > Currently, RTEMS' implementation does check whether the 3rd argument
> > is an available FD.
> >
> Sounds like a missing error check.


Not that really. If the caller specified FD is already used, it is not an
error, but fcntl should try to find a lowest free one starting from it.



> Part of writing a good proposal in real life is leaving wiggle room to
> pick the correct solution. If you knew the answer, you wouldn't have
> work to do. :-D
>
> Don't fret over these.


Ok, let me see if it is possible to have a try.
To be honest, I spent quite some time these days to study the opengroup
specification, source code of RTEMS, and compare it with the implementation
of Linux, BSD, and OpenSolaris, but maybe, the biggest problem for me is
that I am not a native English speaker and writting something not so
urgly often costs me lots of time ...

Regards,
Wei Shen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20080325/b16bbfb8/attachment-0001.html>


More information about the users mailing list