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

Clean shutdown of svnserve

From: Arlie Davis <adavis_at_stonestreetone.com>
Date: 2006-02-22 22:11:11 CET

Ok, I'm cleaning up the work on the service implementation for svnserve.
But I don't see how to handle one situation. Service start-up works just
fine.

How should I cleanly shut down the svnserve process? I know how to receive
the "stop" request from the service control manager -- the quest is, what do
I do when I receive that request? I see the "while (1)" loop in main(),
which is easy enough to break out of, *if* that loop is running. However,
it appears that the main() thread spends most of its life blocked in a call
to apr_socket_accept.

What's the best way to interrupt this accept operation, and to cleanly tear
down the process in general? (I'm most concerned about safely stopping
access to any databases, etc.) I'm very familiar with the WinSock API --
what I'm asking is, what's the most SVN-friendly, APR-friendly, etc. way to
do it?

I couldn't find a SIGQUIT handler or anything similar in the svnserve
sources. Is the current "best" way to just terminate the process? That
seems rather barbaric.

-- arlie

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