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

RE: Diffs for running svnserve as a Win32 service

From: Arlie Davis <adavis_at_stonestreetone.com>
Date: 2006-02-24 22:01:43 CET

If someone wants to provide a way to cleanly shut down svnserve, I'm all for
it. But the fact is that svnserve does not currently provide for clean
shutdown on *any* platform. It does not register any signal handlers for
SIGQUIT, etc. So, holding up this patch seems unfair -- I'm providing a
feature, not trying to solve problems that existed before I showed up.

-- arlie

-----Original Message-----
From: rooneg@gmail.com [mailto:rooneg@gmail.com] On Behalf Of Garrett Rooney
Sent: Friday, February 24, 2006 3:49 PM
To: Arlie Davis
Cc: Ivan Zhakov; dev@subversion.tigris.org
Subject: Re: Diffs for running svnserve as a Win32 service

On 2/24/06, Arlie Davis <adavis@stonestreetone.com> wrote:

> Second, the call to closesocket. The current technique for stopping
> svnserve is not pretty, but I don't see a better way to do it.
> Calling apr_socket_close could actually cause a serious program
> (segmentation fault), because main() (and the functions that it
> calls) would exit the loop and would very likely touch fields within
> the apr_socket_t instance. If the service dispatcher thread freed
> that memory, by calling apr_socket_close, then main() would be
> touching freed memory. But by closing the socket handle, we insure
> that this cannot happen -- the worst thing that happens is that the
> socket *handle* (not structure) gets closed twice, which is ok.

If main is touching fields with the socket after an error is returned from
accept, then that's a bug in main. If an error isn't returned from accept
when the socket is closed via apr_socket_close, that seems kind of odd to
me, and should be investigated. Regardless, if you're putting a "clean
shutdown" feature into svnserve it should work on all platforms, not just
Win32.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 24 22:01:56 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.