Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!mcvax!ukc!warwick!cudcv From: cudcv@warwick.UUCP Newsgroups: news.software.b Subject: Re: Problem with News 2.11.6 and fix Message-ID: <340@sol.warwick.ac.uk> Date: Tue, 31-Mar-87 08:51:28 EST Article-I.D.: sol.340 Posted: Tue Mar 31 08:51:28 1987 Date-Received: Sat, 4-Apr-87 15:01:19 EST References: <199@ems.UUCP> Reply-To: cudcv@sol.warwick.ac.uk (Rob McMahon) Organization: Computing Services, Warwick University, UK Lines: 29 In article <199@ems.UUCP> mark@ems.UUCP (Mark H. Colburn) writes: > if (pid == 0) { > ... > execl(RNEWS, "rnews", "-S", "-p", dir->d_name, > (char *) NULL); > ... > _exit(1); > ^^^^^^^^^ > } > >This means that the child will _ALWAYS_ exit with a code of 1, and the >parent will _ALWAYS_ abort with an error of 256. Obviously the fix is to >modify the _exit(1) to an _exit(0). I hesitate to answer this and, even more to followup rather than reply, since I'm sure many others will, but I can't let it go by with that "Obviously" there - someone might believe this. No, no. The _exit(1) only gets called if it couldn't exec RNEWS. execl(3) does not return except on error, so the (1) is perfectly right - this is an error, and means rnews couldn't be found, or exec'ed. (It's _exit rather than just exit so that buffers don't get flushed twice.) -- UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick.daisy ARPA: cudcv@daisy.warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England