Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!mailrus!husc6!linus!encore!bzs
From: bzs@encore.UUCP (Barry Shein)
Newsgroups: comp.unix.wizards
Subject: Re: att & osf
Message-ID: <3498@encore.UUCP>
Date: 20 Aug 88 20:10:11 GMT
References: <4964@killer.DALLAS.TX.US> <3395@vpk4.UUCP> <1988Aug5.211217.21037@utzoo.uucp> <2998@homxc.UUCP> <1988Aug19.204836.23395@utzoo.uucp>
Organization: Encore Computer Corp, Marlboro, MA
Lines: 17
In-reply-to: henry@utzoo.uucp's message of 19 Aug 88 20:48:36 GMT


Henry Spencer writes...
>Well, actually, it can in various ways.  To take a small example, consider
>the vile botch in System V interprocess communication of using -1 (rather
>than 0) cast to a pointer as an error return code.  That is *not* portable,
>but it happens to work on certain architectures.

Far be it for me to defend anyone, but this stems from a day-one bug
that predates all of this (at least V6, probably earlier.)

Consider that sbrk() returns -1 (specifically, (char *)-1) as an error
code in all Unix's I know of (BSD, SYSV.)

Real problem of conventions, should syscalls always try to return -1?
Unfortunate convention!

	-Barry Shein, ||Encore||