www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/04/23/11:51:51

Message-Id: <m10aiCm-000S8hC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Nate Eldredge <nate AT cartsys DOT com>, djgpp-workers AT delorie DOT com
Date: Fri, 23 Apr 1999 12:52:32 +0000
MIME-Version: 1.0
Subject: Re: A workaround for Unix-style temporary files
In-reply-to: <371FC585.F59DB1CF@cartsys.com>
X-mailer: Pegasus Mail for Windows (v2.54)
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Nate Eldredge <nate AT cartsys DOT com> wrote:

> Eli Zaretskii wrote:
> > 
> > On Thu, 22 Apr 1999, Salvador Eduardo Tropea (SET) wrote:
> > 
> > > But we can remove if the program crashes too, why not? For example: when my
> > > program crashes I store the unsaved documents in a special file, so libc can
> > > remove temporals during a crash too.
> > 
> > A program which catches SIGSEGV can ineed do that, to some extent (there
> > are bad crashes, like when the stack is scrogged, that would prevent even
> > this from working).  However, Mark was suggesting a solution that should
> > be part of the library.  And a library function that hooks SIGSEGV
> > complicates its usage too much.
> 
> Also, IMHO, it's a misfeature.  When your program crashes, data in
> tempfiles could be extremely helpful to debugging it.
> 
> I think that what we do on crashing should be limited to that which is
> necessary to keep from crashing the whole system (unhook int handlers,
> etc), and that which helps debugging (like the traceback).  I don't
> think it's a good idea to perform unnecessary cleanup.

Nate, that's a different topic, we are talking about programs that uses 
unlink for an opened file, in UNIX and NT this file is removed when the 
program dies (as you explained to me ;-), we are talking about a possible way 
to emulate it removing the file in close and in the SIGSEGV. If the 
programmer used this trick is because s/he wants to kill the file even if the 
program crashes.

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://welcome.to/SetSoft
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(5411) 4759 0013

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019