<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: open() returns file descriptor zero in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/open-returns-file-descriptor-zero/m-p/226889#M16313</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have never heard something like that. What is the Kernel version? It would be good if you call your app with &lt;EM&gt;&lt;STRONG&gt;strace&lt;/STRONG&gt;&lt;/EM&gt;, so you can see all the system calls being before and after your &lt;EM&gt;&lt;STRONG&gt;open&lt;/STRONG&gt;&lt;/EM&gt; call, which may lead to something useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Oct 2013 19:03:54 GMT</pubDate>
    <dc:creator>LeonardoSandova</dc:creator>
    <dc:date>2013-10-23T19:03:54Z</dc:date>
    <item>
      <title>open() returns file descriptor zero</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/open-returns-file-descriptor-zero/m-p/226888#M16312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem where open() on either conventional files or serial port device handles returns file descriptor zero.&amp;nbsp;&amp;nbsp;&amp;nbsp; This has the effect of overwriting the default descriptor for stdin and returning the same file descriptor for different files.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This has occurred on two different OSes (Linaro and Yocto), and two different i.XM6 Q7 modules (iWave and Congatec).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is likely not a coding error.&amp;nbsp; The code works correctly on x86.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have worked around the issue by calling dup() after each open() in order to manually make process-unique descriptors.&amp;nbsp; This results in correct program behavior.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; But I'd like to understand the root cause.&amp;nbsp;&amp;nbsp; Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Oct 2013 18:14:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/open-returns-file-descriptor-zero/m-p/226888#M16312</guid>
      <dc:creator>gregkogut</dc:creator>
      <dc:date>2013-10-23T18:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: open() returns file descriptor zero</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/open-returns-file-descriptor-zero/m-p/226889#M16313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have never heard something like that. What is the Kernel version? It would be good if you call your app with &lt;EM&gt;&lt;STRONG&gt;strace&lt;/STRONG&gt;&lt;/EM&gt;, so you can see all the system calls being before and after your &lt;EM&gt;&lt;STRONG&gt;open&lt;/STRONG&gt;&lt;/EM&gt; call, which may lead to something useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Oct 2013 19:03:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/open-returns-file-descriptor-zero/m-p/226889#M16313</guid>
      <dc:creator>LeonardoSandova</dc:creator>
      <dc:date>2013-10-23T19:03:54Z</dc:date>
    </item>
  </channel>
</rss>

