[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: subversion/subversion/clients/win32/svn_com SVN.cpp MarshalArray.h

From: Branko Čibej <brane_at_xbc.nu>
Date: 2001-02-02 21:32:27 CET

Greg Stein wrote:

>> Forget it, that won't work in general. One of the more marvelous
>> features of Win32 dynamic linking is that DLL_THREAD_DETACH and
>> DLL_PROCESS_DETACH don't get sent if a process crashes.
> Well... if there is a crash, then there is a crash. Not much you can do
> about that. You can code for proper behavior, but not for crashes.

What I meant is that if you want to write a shared DLL that keeps
internal state for each client process, you'll simply have to live with
the fact that client crashes will cause leaks. The module loader or
whichever part of the executive is responsible for cleanup should call
those hooks in the DLL, but it doesn't.

How's that for a sad joke: I've seen a workaround for this problem. The
library startup routine created a private thread at module-load time;
then it opened a socket to each new process that attached to the DLL,
and the thread periodically checked for EPIPE from those sockets and did
the necessary cleanup ... bleargh.

(The other workaround is to have clients that don't crash. I'd rather go
for that one, too.)

Brane �ibej
    home:   <brane_at_xbc.nu>             http://www.xbc.nu/brane/
    work:   <branko.cibej_at_hermes.si>   http://www.hermes-softlab.com/
     ACM:   <brane_at_acm.org>            http://www.acm.org/
Received on Sat Oct 21 14:36:21 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.