SCO XENIX bug prevents smail from working correctly.

Dave Hammond daveh at marob.MASA.COM
Fri Jan 20 23:16:49 AEST 1989


In article <31 at elgar.UUCP> ag at elgar.UUCP (Keith Gabryelski) writes:
>The SCO XENIX C compiler (mine is version 2.2) does not handle a
>return from main() correctly.  A return from main should be the same
>as an exit from main.  It isn't.
>You can confirm this by compiling, running, and checking the exit
>status of:
>	main(){ return 0; }
>and
>	main(){ exit(0); }
>(On my machine, a 386 box running 2.3.1 OS and 2.2 dev system
>The former's exit status is 1.  The latter's exit status is 0.

Hmmm ...

[ tested on a SCO 386 box, 2.3.1 OS, 2.2 DS ]

$ echo "main(){exit(0);}" >foo.c
$ cc foo.c
$ a.out
$ echo $?
$ 0
$ echo "main(){return(0);}" >foo.c
$ cc foo.c
$ a.out
$ echo $?
$ 0
$ echo "main(){exit(1);}" >foo.c
$ cc foo.c
$ a.out
$ echo $?
$ 1
$ echo "main(){return(1);}" >foo.c
$ cc foo.c
$ a.out
$ echo $?
$ 1

Hmmm ...  [BTW, smail works fine on our SCO 2.2 and 2.3 OS's]

Perhaps you're running a hacked-up shell?

--
Dave Hammond
...!uunet!masa.com!{marob,dsix2}!daveh



More information about the Comp.unix.xenix mailing list