Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Richard Henderson <richard@atheist.tamu.edu>
Subject: Re: fclose()
Date: Mon, 17 Feb 1997 14:04:20 -0600 (CST)	[thread overview]
Message-ID: <03f0a9eb6ff6ca4eacc10f6f28ad5114.axp-list@archive.invalid> (raw)
In-Reply-To: <9702171347.ZM781@davros.bwh.com>

> In professional world, I've seen far too many programs that close all
> handles at termination, regardless of whether if known that handle is
> open or not. It WOULD be nice to legislate good programming, I agree...

*sigh*  Well, there is a solution when you can't fix the source
and that is use a different malloc that can handle multiple frees.
This can be done by either explicitly linking with one when you are
in control of such things or using LD_PRELOAD when you aren't.

But the vast majority of the programs run under Linux *can* have
their sources fixed, and most often it's just a silly little thing
that only takes a few minutes, and so we should.

> But legacy code rules, especially when practice is "sort of" backed up
> by API specs.

There is no API spec that allows "fclose(foo); fclose(foo);".
As always, the effect is undefined/unpredictable.

r~

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

  reply	other threads:[~1997-02-17 20:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <richard@atheist.tamu.edu>
1996-05-09 14:55 ` gdb Eric Youngdale
1996-10-29 18:50 ` thanks to Richard : Xemacs compiled as ELF Zarmfab Software Development
1996-11-15 13:28 ` glibc snapshot 961111 binaries Zarmfab Software Development
1996-11-18 13:30 ` PLEASE HELP glibc 961111 : can't execute libm - linked programs Zarmfab Software Development
1996-11-19 11:12   ` Miquel van Smoorenburg
1996-11-26 19:15 ` binutils fun Bryan W. Headley
1996-11-26 18:54   ` Richard Henderson
1997-02-17 19:47 ` fclose() Bryan W. Headley
1997-02-17 20:04   ` Richard Henderson [this message]
1997-02-17 16:44 fclose() Uncle George
     [not found] <33088AF0.2FF1@voicenet.com>
1997-02-17 19:01 ` fclose() Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
1997-02-18 14:19 fclose() Uncle George
     [not found] <3309BA67.2168@voicenet.com>
1997-02-18 16:04 ` fclose() Richard Henderson
1997-02-18 18:06 fclose() Uncle George
1997-02-18 19:11 fclose() Mark Hamstra
1997-02-18 19:13 fclose() Eric Smith
     [not found] <19970218191335.5758.qmail@brouhaha.com>
1997-02-18 22:32 ` fclose() D. Champion
1997-02-19 13:20 fclose() Uncle George
     [not found] <330AFE32.5C6E@voicenet.com>
1997-02-19 14:49 ` fclose() Richard Henderson
1997-02-19 17:45 ` fclose() Philip Blundell
1997-02-24 13:57 fclose() Uncle George
     [not found] <33119E2E.7313@voicenet.com>
1997-02-24 19:34 ` fclose() Richard Henderson
1997-02-24 19:41 fclose() Eric Smith
1997-02-24 21:17 fclose() Craig Burley
     [not found] <eric@brouhaha.com>
1997-02-25  4:08 ` fclose() Bryan W. Headley
1997-02-25  9:52 fclose() Uncle George
1997-02-25 10:03 fclose() Uncle George
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox