This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GNU GCC's f77 [tempnam -> mkstemp; proposed patch]


On Tue, Nov 14, 2000 at 02:52:06PM -0800, Richard Henderson wrote:
> On Tue, Nov 14, 2000 at 10:42:57PM +0100, Toon Moene wrote:
> > If noone shoots a hole in this update before tomorrow 18 UTC, I'll apply
> > the patch:
> 
> Well, I don't see anything wrong with the patch itself.  But
> looking at the surrounding code I'd say it's pointless.  If
> you go and close the file immediately, and re-open it by name
> you've just obviated all the benefit of using mkstemp.

But mkstemp has created the file, so unless you unlink it, you own
that name.  Right?  Absent a malicious root or bad permissions on
/tmp... okay, it's not ideal.

> Really, that code is so ugly as to be practially unsalvagable.

No argument from me here.

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]