On 1/13/07, D.J. Heap <djheap@gmail.com> wrote:
> On 1/7/07, Ivan Zhakov <chemodax@gmail.com> wrote:
> > On 1/3/07, Lieven Govaerts <lgo@mobsol.be> wrote:
> > >
> > > Attached is a patch that implements a crash handler (Windows specific)
> > > for the command line apps. While I learned a lot from Stefan Küng's
> > > patch posted here some time ago, it's basically a new implementation.
> > > Review of my choices (see below) and the patch itself are greatly
> > > appreciated.
>
>
> I've been testing this a bit and it looks very promising, thanks!
>
> I haven't reviewed it as thoroughly as Ivan, but I do agree with most
> of his comments except:
>
>
> >
> > many unbuffered writes to file. I suggest create file use run-time
> > function open(), then get Windows handle using _get_osfhandle() for
> > MiniDumpWrite.
>
>
> I don't think they are unbuffered -- I'm pretty sure the
> CreateFile/WriteFile API's do buffering unless you explicitly turn it
> off.
It's just term "buffered", because CRT have two differenet file APIs
open/read/write/close which some times called "unbuffered" and
fopen/fwrite/fread/fclose which is have user space buffer.
> And I'd say the less dependencies the better when doing a crash
> dump -- the CRT could be corrupt and not even able to write a file out
> (the whole process could be so corrupt that even CreateFile/WriteFile
> won't work, but it seems less likely than CRT corruption).
Good point, but anyway we use CRT for sprintf and other things. So in
this case it's doesn't matter to use fopen/fprintf to make code
simple.
--
Ivan Zhakov
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jan 13 23:31:51 2007