From owner-freebsd-stable Thu Sep 9 13: 1:58 1999 Delivered-To: freebsd-stable@freebsd.org Received: from prime.net.ua (P1M3.prime.net.ua [195.64.229.35]) by hub.freebsd.org (Postfix) with ESMTP id 501C415807 for ; Thu, 9 Sep 1999 13:01:50 -0700 (PDT) (envelope-from andyo@prime.net.ua) Received: from prime.net.ua (localhost [127.0.0.1]) by prime.net.ua (8.9.3/8.9.3) with ESMTP id XAA04049 for ; Thu, 9 Sep 1999 23:02:28 +0300 (EEST) Message-ID: <37D8124F.470722F9@prime.net.ua> Date: Thu, 09 Sep 1999 23:02:24 +0300 From: "Andy V. Oleynik" X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.3-RC i386) X-Accept-Language: ru, en, uk MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: fclose(NULL) - 2 versions of FBSD & cc & 2 different behavours Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG A lot of time ago my collegue wrote the c-prog intended to be ran as cgi script. He did mistake in prog: to check that file existed he opened it with fopen (why not access I didnt understand :) and after some action closed it with fclose. Upon some condition as I said the file might not existed. So prog did fclose(NULL) in fact. Now interesting thing. On the 2.2.7-R systems having been compiled with 2.7.2.1 it never been crashed. But on 3.2-S recently cvsupped & makeworlded latly having been compiled with cc 2.7.2.3 it crashes with 10 SIG (as expected I beleave). Somebody have a words of wisdom? -- WBW Andy V. Oleynik PGP key's fingerprint prime.net.ua's D0 1E 7B B4 33 65 49 97 9C 79 7C 64 5C 9C F3 25 system administrator +380442448363 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message