Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!ccicpg!felix!chuck From: mark@applix.UUCP (Mark Fox) Newsgroups: comp.unix.ultrix Subject: Ultrix 2.0 executable dumps core on 1.2 Message-ID: <12683@felix.UUCP> Date: Thu, 12-Nov-87 18:02:35 EST Article-I.D.: felix.12683 Posted: Thu Nov 12 18:02:35 1987 Date-Received: Sun, 15-Nov-87 07:50:45 EST Sender: chuck@felix.UUCP Reply-To: mark@applix.UUCP (Mark Fox) Organization: APPLiX Inc., Westboro MA Lines: 27 Approved: zemon@felix.UUCP Reply-Path: I have a program built on an Ultrix 2.0 system. It executes a new system call (getmnt) which didn't exist in 1.2. Guess what happens if I try to execute it on a 1.2 system -- it dumps core with the following message and stack trace: % a.out Bad system call (core dumped) % adb a.out $c _getmnt(7fffe2e0,7fffd8dc,a00) from 30e _getdfnms(7fffe304) from 155 _main(1,7fffe380,7fffe388) from 92 Two questions: 1) How can I *reliably* tell at runtime that I am on a pre-2.0 version of Ultrix so that my application doesn't issue this or other "Bad system calls"? (A compile-time check that would force me to have separate 1.2 and 2.0 distributions of my application is not acceptable. Requiring all of my users to upgrade to 2.0 isn't either.) 2) Will subsequent versions of Ultrix simply return an error to a "Bad system call" or will they continue to rudely and inexcusably dump core? Really, dumping core is a bug not a feature, isn't it? -- Mark Fox Applix Inc., 112 Turnpike Road, Westboro, MA 01581, (617) 870-0300 uucp: {ames,rutgers}!harvard!m2c!applix!mark