Message78768
| Author |
kristjan.jonsson |
| Recipients |
amaury.forgeotdarc, kristjan.jonsson, mhammond |
| Date |
2009年01月02日.09:56:18 |
| SpamBayes Score |
0.04449446 |
| Marked as misclassified |
No |
| Message-id |
<930F189C8A437347B80DF2C156F7EC7F04D1702FD7@exchis.ccp.ad.local> |
| In-reply-to |
<1230887830.55.0.601904720526.issue4804@psf.upfronthosting.co.za> |
| Content |
Btw,
It occurred to me that a more gentle way to do this is to disable the functionality only around close().
This is far less intrusive, for example, in an embedded environment.
I must confess that I had completely forgototten about the disabling of the assertion and only stumbled on this recently when I was trying to find out why none of my _ASSERTS in eve worked! Making wholesale CRT settings certainly should be avoided.
So, as I said, we could very well avoid this by just wrapping a few instances of close() with a CrtSetErrorHandler calls and friends. With the caveat that these are not threadsafe, that is, it is a process global setting for the CRT. But toggling it during a limited scope surely is less intrusive than modifying it for the entire process permanently.
Kristján |
|