[comp.unix.xenix] rmail return codes

tony@ajfcal.UUCP (Tony Field) (04/25/89)

I am trying to determine the cause of the following error message which
was returned after mail transfer to another system. Both system use
Xenix, elm2.2 and smail2.5. The originator of mail transfer uses Xenix
2.2.3. The recipient (who also returns this error message) uses Xenix 2.3.1.

         remote execution     [uucp job ajfcalX4506 (4/24-22:53:09)]
              rmail root 
         exited with status 2

I initially thought that is exit status was the traditional:

	  2  ENOENT  No	such file or directory:
	       This error occurs when a	filename is specified and the
	       file should exist but doesn't, or when one of the
	       directories in a	pathname does not exist.
	       
however, it does not make sense...    Any suggestions???????
-- 
+------------------------------------
|  Tony Field                             ..uunet!utai!calgary!ajfcal!tony
|  Co-Design Information Systems Ltd.
|  Calgary, Alberta, Canada                 voice: (403) 266-3239

chip@vector.Dallas.TX.US (Chip Rosenthal) (05/02/89)

In article <57@ajfcal.UUCP> tony@ajfcal.UUCP (Tony Field) writes:
>         remote execution     [uucp job ajfcalX4506 (4/24-22:53:09)]
>              rmail root 
>         exited with status 2

Old versions of the development system (something like 2.2.0) are broke.
This:

		main() { return(0); }

does not work.  Smail does this, and the termination status is 2 not 0.
To fix this, either s/return(0)/exit(0)/ or get the UFC (or a later) update.

Speaking of SQA...just did my 2.3 update this weekend.  Uuinstall is
a barrel of laughs.
-- 
Chip Rosenthal / chip@vector.Dallas.TX.US / Dallas Semiconductor / 214-450-5337

patg@impch.UUCP (Patrick Guelat) (05/09/89)

In article <57@ajfcal.UUCP> tony@ajfcal.UUCP (Tony Field) writes:
+------------------
|I am trying to determine the cause of the following error message which
|was returned after mail transfer to another system. Both system use
|Xenix, elm2.2 and smail2.5. The originator of mail transfer uses Xenix
|2.2.3. The recipient (who also returns this error message) uses Xenix 2.3.1.
|
|         remote execution     [uucp job ajfcalX4506 (4/24-22:53:09)]
|              rmail root 
|         exited with status 2
+------------------

Ok let's assume the mail was delivered properly w/o any errors.

Now go and find that bug ! No, no it's not the installation.
Hmmm is it somewhere in the code of smail ?? Nope ... 

--> It's a litle bug in the 386-version of cc or the libraries .... YUCK ! 

Problem: a return with 'return(value)' from main()  will result a random
         exit value.

main()
{
	return(100);
}

If compiled with '-M2' (286) this programm will exit with exitstatus=100 
If compiled with '-M3  (386) it will exit with a random (?) exit value.

To fix your problem change the line in 'main.c' of smail that
contains 'return(exitstat)' to 'exit(exitstat)' .. That's it...

	Patrick
--
\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//
// Patrick Guelat, ImproWare Switzerland    \    SMART: patg@impch.uucp   \\
\\ SUB-NET: ..!altger!impch!{patg,boxdiger}  \________ Wasting time is an //
// EUNET  : ..!cernvax!impch!{patg,boxdiger}          \  important time of\\
\\ OTHER  : ..!uunet!acad!acadch!impch!{patg,boxdiger} \   living.        //
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\