mmaaiinn() -- C Language

Introduce program's main function

A C  program consists of  a set of  functions, one of which  must be called
mmaaiinn(). This function is called  from the runtime startup routine after the
runtime environment has been initialized.

Programs can terminate  in one of two ways.  The  easiest is simply to have
the mmaaiinn()  routine rreettuurrnn().  Control returns  to the runtime  startup; it
closes  all open  file streams  and otherwise cleans  up, and  then returns
control to the operating system, passing it the value returned by mmaaiinn() as
exit status.

In some  situations (errors, for  example), it may  be necessary to  stop a
program,  and you  may not  want  to return  to mmaaiinn().  Here, you  can use
eexxiitt(); it  cleans up  the debris  left by the  broken program  and returns
control directly to the operating system.

A  second exit  routine,  called _eexxiitt(),  quickly returns  control to  the
operating system  without performing any  cleanup.  This routine  should be
used with  care, because  bypassing the cleanup  will leave files  open and
buffers of data in memory.

Programs compiled  by COHERENT return  to the program that  called them; if
they return  from mmaaiinn()  with a  value or call  eexxiitt() with a  value, that
value is  returned to  their caller.   Programs that invoke  other programs
through  the function  ssyysstteemm() check  the returned value  to see  if these
secondary programs terminated successfully.

_S_e_e _A_l_s_o
_eexxiitt(), aarrggcc, aarrggvv, CC llaanngguuaaggee, eennvvpp, eexxiitt()
ANSI Standard, section 5.1.2.2.1
POSIX Standard, section 3.1.2.2
