Sender: nate AT cartsys DOT com Message-ID: <371FC585.F59DB1CF@cartsys.com> Date: Thu, 22 Apr 1999 17:57:41 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.5 i586) MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: A workaround for Unix-style temporary files References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com 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 Eldredge nate AT cartsys DOT com