title: main function in c - program termination success or failure
body: <p>As far as I understand if the main function returns 0 this indicates always successful program termination. Even if success is indicated by another int value.</p>
  
  <p>If main returns a non-zero value it is implementation specific if this stands for unsuccessful program termination or another error code </p>
  
  <blockquote>
    <p>If the value of <strong><code>status</code></strong> is zero or <strong><code>EXIT_SUCCESS</code></strong>, an
    implementation-defined form of the status <em>successful termination</em> is
    returned.  If the  value of <strong><code>status</code></strong> is <strong><code>EXIT_FAILURE</code></strong>, an
    implementation-defined form of the status <em>unsuccessful termination</em>
    is returned.   Otherwise the status  returned is
    implementation-defined.)</p>
  </blockquote>
  
  <p>So only success is defined in the C standard (return 0) and not how a non-zero int value is interpreted, right? E.g. if in a certain system 1 stands for "success" return 0 would be deliver 1 as well? How is this done?</p>