Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!tgr!root%bostonu.csnet@CSNET-RELAY.ARPA From: root%bostonu.csnet@CSNET-RELAY.ARPA (BostonU SysMgr) Newsgroups: net.unix-wizards Subject: SHMOP (SYSV) Message-ID: <2335@brl-tgr.ARPA> Date: Tue, 22-Oct-85 17:52:34 EDT Article-I.D.: brl-tgr.2335 Posted: Tue Oct 22 17:52:34 1985 Date-Received: Thu, 24-Oct-85 06:05:06 EDT Sender: news@brl-tgr.ARPA Lines: 27 Ok, nobody leave the room...someone call the UNIX police... From SHMOP(2): char *shmat(...) ... Upon successful completion, the return value is as follows: Shmat returns the data segment start address of the attached shared memory segment ... Otherwise, a value of -1 is returned... --- Yup, sure does, about the only one like it I know of, test has to go something like: if(((int) (foo = (footype) shmat(args))) == -1) error... anyone know any good reason why it (peculiarly) doesn't return NULL on failure? Even that use of an (int) cast isn't quite right, long may be closer, maybe, or some union tomfoolery. I would understand if this were old but it isn't. I doubt very much NULL is a reasonable return value on success. (note: SYSVR2/3B2 if it makes any difference.) -Barry Shein, Boston University