Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!indri!lll-winken!uunet!mcvax!cernvax!acadch!impch!patg From: patg@impch.UUCP (Patrick Guelat) Newsgroups: comp.unix.xenix Subject: Re: rmail return codes Message-ID: <899@impch.UUCP> Date: 8 May 89 22:28:02 GMT References: <57@ajfcal.UUCP> Reply-To: patg@impch.UUCP (Patrick Guelat) Organization: ImproWare ComputerSystems Switzerland Lines: 41 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. // //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\