<div>Hi Joel,</div>
<div> </div>
<div>Thanks for the long reply.<br> </div>
<div><span class="gmail_quote">On 3/24/08, <b class="gmail_sendername">Joel Sherrill</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>> wrote:</span> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">> (2) fcntl with F_DUPFD should try to find "a new file descriptor which<br>> shall be the lowest numbered available (that is, not already open)<br>
> file descriptor greater than or equal to the third argument".<br>> Currently, RTEMS' implementation does check whether the 3rd argument<br>> is an available FD.<br>><br>Sounds like a missing error check.</blockquote>
<div> </div>
<div>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.</div>
<div><br> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Part of writing a good proposal in real life is leaving wiggle room to<br>pick the correct solution. If you knew the answer, you wouldn't have<br>
work to do. :-D<br><br>Don't fret over these.</blockquote>
<div> </div>
<div>Ok, let me see if it is possible to have a try.<br>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 ...</div>
<div> </div>
<div>Regards,</div>
<div>Wei Shen</div>