<?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: E_NOENT while file exist ! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283481#M882263</link>
    <description>The first thing that I notice is that there is no return for this function when the file is able to be opened. This may be because you have posted only a snippit of code or i you may have an defined result.&lt;BR /&gt;&lt;BR /&gt;In any event, sometimes it's nice to fall back on the old standards to print errors. I would replace the cout with&lt;BR /&gt;(void) fprintf(stderr,"Filename: \"%s\" errno: %d\n",filename,errno);&lt;BR /&gt;int i = 0,len = 0;&lt;BR /&gt;len = strlen(filename);&lt;BR /&gt;while (i &amp;lt; len)&lt;BR /&gt;{&lt;BR /&gt;  if (filename[i] &amp;gt;= ' ' &amp;amp;&amp;amp; filename[i] &amp;lt;= '~') (void) fprintf(stderr,"%c",filename[i])&lt;BR /&gt;else (void) fprintf(stderr,"|%03o|",(int) filename[i]);&lt;BR /&gt;  ++i;&lt;BR /&gt;}&lt;BR /&gt;(void) fprintf(stderr,"\n");&lt;BR /&gt;(void) fflush(stderr);&lt;BR /&gt;&lt;BR /&gt;The idea is to detect any non-printable characters embedded in the filename.&lt;BR /&gt;&lt;BR /&gt;One other observation, fopen is slightly removed from the actual system call open() so if you are really fighting a mysterious problem, you may want to use open instead so that you know it is what actually set errno although fopen should be close enough to the scene of the crime.</description>
    <pubDate>Fri, 21 May 2004 12:24:02 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2004-05-21T12:24:02Z</dc:date>
    <item>
      <title>E_NOENT while file exist !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283476#M882258</link>
      <description>Could this error be related to a kernel limit?</description>
      <pubDate>Fri, 21 May 2004 11:40:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283476#M882258</guid>
      <dc:creator>Laurent Laperrousaz</dc:creator>
      <dc:date>2004-05-21T11:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOENT while file exist !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283477#M882259</link>
      <description>check the directory path and permissions also. Not related to kernel parameters.</description>
      <pubDate>Fri, 21 May 2004 11:43:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283477#M882259</guid>
      <dc:creator>Navin Bhat_2</dc:creator>
      <dc:date>2004-05-21T11:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOENT while file exist !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283478#M882260</link>
      <description>When and where did you see the this error. Please give more details regarding the same.&lt;BR /&gt;Regards,&lt;BR /&gt;</description>
      <pubDate>Fri, 21 May 2004 11:44:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283478#M882260</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-05-21T11:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOENT while file exist !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283479#M882261</link>
      <description>Generally not but ENOENT can be set my many system calls --- some of which have nothing to do with files. An errno value out of context (at a minimum the system call that it is related to) is of little value.&lt;BR /&gt;&lt;BR /&gt;Ideally, you need errno and the system call that set it along with the actual parameters passed to the system call. Tusc can actually be used to yield these results for a process.&lt;BR /&gt;</description>
      <pubDate>Fri, 21 May 2004 11:46:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283479#M882261</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-05-21T11:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOENT while file exist !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283480#M882262</link>
      <description>I already posted a question for this problem:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=216102" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=216102&lt;/A&gt;&lt;BR /&gt;and i thought it was gone...&lt;BR /&gt;&lt;BR /&gt;Alas, it is back!&lt;BR /&gt;&lt;BR /&gt;here is the code where I test the existence of the file:&lt;BR /&gt;It may say "file not exist" or it works fine (with the same file)&lt;BR /&gt;&lt;BR /&gt;// Pour vÃ©rifier l'existence d'un fichier&lt;BR /&gt;bool fileExists(const char *filename)&lt;BR /&gt;{&lt;BR /&gt; // Initialise Ã&amp;nbsp; NULL&lt;BR /&gt; FILE *fichier = NULL;&lt;BR /&gt;&lt;BR /&gt; // Ouvre le fichier en lecture seulement&lt;BR /&gt; fichier = fopen(filename, "r");&lt;BR /&gt;&lt;BR /&gt; // Si NULL est renvoyÃ© c'est parce que le fichier n'a pas Ã©tÃ© trouvÃ© ou bien qu'il est dÃ©jÃ&amp;nbsp; ouvert(pas accessible...) ou autres...&lt;BR /&gt; if (fichier == NULL)&lt;BR /&gt;   {&lt;BR /&gt;          cout &amp;lt;&amp;lt; "erreur fileExists " &amp;lt;&amp;lt; string(filename, strlen(filename)) &amp;lt;&amp;lt;" , errno = " &amp;lt;&amp;lt; errno &amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt;   return false;&lt;BR /&gt;          }&lt;BR /&gt; // Ferme le fichier&lt;BR /&gt; fclose(fichier);&lt;BR /&gt;&lt;BR /&gt; // Renvoie true, le fichier existe bien&lt;BR /&gt;</description>
      <pubDate>Fri, 21 May 2004 11:58:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283480#M882262</guid>
      <dc:creator>Laurent Laperrousaz</dc:creator>
      <dc:date>2004-05-21T11:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOENT while file exist !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283481#M882263</link>
      <description>The first thing that I notice is that there is no return for this function when the file is able to be opened. This may be because you have posted only a snippit of code or i you may have an defined result.&lt;BR /&gt;&lt;BR /&gt;In any event, sometimes it's nice to fall back on the old standards to print errors. I would replace the cout with&lt;BR /&gt;(void) fprintf(stderr,"Filename: \"%s\" errno: %d\n",filename,errno);&lt;BR /&gt;int i = 0,len = 0;&lt;BR /&gt;len = strlen(filename);&lt;BR /&gt;while (i &amp;lt; len)&lt;BR /&gt;{&lt;BR /&gt;  if (filename[i] &amp;gt;= ' ' &amp;amp;&amp;amp; filename[i] &amp;lt;= '~') (void) fprintf(stderr,"%c",filename[i])&lt;BR /&gt;else (void) fprintf(stderr,"|%03o|",(int) filename[i]);&lt;BR /&gt;  ++i;&lt;BR /&gt;}&lt;BR /&gt;(void) fprintf(stderr,"\n");&lt;BR /&gt;(void) fflush(stderr);&lt;BR /&gt;&lt;BR /&gt;The idea is to detect any non-printable characters embedded in the filename.&lt;BR /&gt;&lt;BR /&gt;One other observation, fopen is slightly removed from the actual system call open() so if you are really fighting a mysterious problem, you may want to use open instead so that you know it is what actually set errno although fopen should be close enough to the scene of the crime.</description>
      <pubDate>Fri, 21 May 2004 12:24:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283481#M882263</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-05-21T12:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOENT while file exist !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283482#M882264</link>
      <description>you are right, I forgot 2 lines in my cut and paste!&lt;BR /&gt;&lt;BR /&gt;Anyway I will try your suggestions and let you know...&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Laurent</description>
      <pubDate>Fri, 21 May 2004 12:29:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/e-noent-while-file-exist/m-p/3283482#M882264</guid>
      <dc:creator>Laurent Laperrousaz</dc:creator>
      <dc:date>2004-05-21T12:29:38Z</dc:date>
    </item>
  </channel>
</rss>

