<?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: Exit status code 0377 (255 or -1) in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/code-0377/m-p/3952955#M97856</link>
    <description>&lt;P&gt;&amp;gt;Clay: in that case, the value returned to the system is undefined&lt;BR /&gt;&lt;BR /&gt;For C99 and C++ the Standards says it returns 0. HP's C compiler should now do that by default.&lt;BR /&gt;But unless you know you are using C99, you should do an explict return of 0 for C.&lt;/P&gt;</description>
    <pubDate>Sat, 28 Sep 2013 21:55:18 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2013-09-28T21:55:18Z</dc:date>
    <item>
      <title>code 0377</title>
      <link>https://community.hpe.com/t5/operating-system-linux/code-0377/m-p/3952952#M97853</link>
      <description>gdb reports statement(program exited with code 0377)&lt;BR /&gt;&lt;BR /&gt;Somebody knows the reason of this problem?&lt;BR /&gt;Thanks in advance!&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Feb 2007 08:30:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/code-0377/m-p/3952952#M97853</guid>
      <dc:creator>subrat chaudhary</dc:creator>
      <dc:date>2007-02-28T08:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: code 0377</title>
      <link>https://community.hpe.com/t5/operating-system-linux/code-0377/m-p/3952953#M97854</link>
      <description>Subrat,&lt;BR /&gt;this could be down to unhandled error condition. 0377oct is 255dec, which could be interpreted as -1.&lt;BR /&gt;&lt;BR /&gt;If this is a C program add an atexit function, which is defined in stdlib.h.&lt;BR /&gt;&lt;BR /&gt;Then debug you program, and watch for return codes from called functions.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated.&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Feb 2007 08:44:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/code-0377/m-p/3952953#M97854</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-02-28T08:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: code 0377</title>
      <link>https://community.hpe.com/t5/operating-system-linux/code-0377/m-p/3952954#M97855</link>
      <description>Every program exits with a status either explicitly with an exit(status) statement or a return(status) from main. The exception to this is if main does not return a value or no exit was called; in that case, the value returned to the system is undefined. By convention, an exit status of zero indicates that all was well. &lt;BR /&gt;&lt;BR /&gt;In your particular case, it appears that an error condition was detected and exit was called with a value of 0377 octal so that if you did an "echo ${?}" immediately after the program terminated, you would see 255. Man 2 exit for details.&lt;BR /&gt;&lt;BR /&gt;This problem should not be considered a program crash since it appears that the program itself detected an abnormal condition and terminated. You really have to inspect the source code to find what would cause an exit with a status of 0377. 0377 only has meaning to those who wrote the program. It's a little surprising that the program was smart enough to detect this condition but sloppy enough not to report some sort of error message on stderr -- or did you leave that part out?&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Feb 2007 10:21:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/code-0377/m-p/3952954#M97855</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-02-28T10:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exit status code 0377 (255 or -1)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/code-0377/m-p/3952955#M97856</link>
      <description>&lt;P&gt;&amp;gt;Clay: in that case, the value returned to the system is undefined&lt;BR /&gt;&lt;BR /&gt;For C99 and C++ the Standards says it returns 0. HP's C compiler should now do that by default.&lt;BR /&gt;But unless you know you are using C99, you should do an explict return of 0 for C.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2013 21:55:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/code-0377/m-p/3952955#M97856</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2013-09-28T21:55:18Z</dc:date>
    </item>
  </channel>
</rss>

