Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC830919); site mcvax.UUCP Path: utzoo!linus!philabs!mcvax!piet From: piet@mcvax.UUCP (Piet Beertema) Newsgroups: net.bugs Subject: Another news 2.10.1 bug Message-ID: <5644@mcvax.UUCP> Date: Fri, 13-Jan-84 12:04:26 EST Article-I.D.: mcvax.5644 Posted: Fri Jan 13 12:04:26 1984 Date-Received: Sat, 14-Jan-84 23:43:58 EST Organization: CWI, Amsterdam Lines: 19 There's another "forget-to-close" bug in ifuncs.c: At the start of broadcast() there is an `xfopen("ARTICLE", "r")' almost immediately followed by a fclose(fp). Within the next while loop transmit() is called with as one of its arguments (again) `xfopen("ARTICLE", "r"))'. Now transmit() can return in several ways without closing the file, which leaves you with too many open file descriptors when broadcasting too many systems. To fix it: - move the fclose(fp) to after the while loop; - replace the transmit() call by: fseek(fp, 0L, 0); transmit(&srec, fp, 1); - remove the fclose(ifp) from transmit(). -- Piet Beertema CWI (Center for Math. & Comp. Science), Amsterdam ...{decvax,philabs}!mcvax!piet