SetupXP

Robert Collins rbcollins@cygwin.com
Sat Jul 19 01:56:00 GMT 2003


On Sat, 2003-07-19 at 11:32, Gary R. Van Sickle wrote:

> > Wait! The status quo must remain, until we have confirmed evidence that
> > static destructors do always run on exit from -mno-cygwin programs.
> 
> As Rob said, he's said that too.  What am I missing?  Neither of LogFile's nor
> LogSingleton's destructors do anything, and this change doesn't remove the
> "theLog->exit (0);" at the end of main() (the only place its' called with 0),
> so... where's the connection?

Well, there are two things.
We used to call ExitProcess(), which (obviously) didn't call
destructors.
Secondly, the destructors do nothing because they where not (and we
haven't tested conclusively if they are nnow) called when ::exit() is
invoked. The functionality in LogFile::exit() for flushing the log file
on exit is appropriate to be put in the destructor - flush on cygwin
exit. We can't put that there until we are sure destructors execute.

The goal long term is to be able to exit() without worrying about the
log (or any other related caching logic). 

Does that clear up the connection?

Rob


-- 
GPG key available at: <http://members.aardvark.net.au/lifeless/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20030719/5bead5d3/attachment.sig>


More information about the Cygwin-apps mailing list