[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: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2006-02-25 00:23:28 CET

Garrett Rooney wrote:

> All I'm saying is that if the Win32 service code requires the ability
> to shut down svnserve gracefully, then that feature should be added in
> such a way that it can be used on systems other than Win32. You seem
> to have gone through a great deal of trouble to peek under the covers
> of APR and insert a platform specific hack to make this work, what I
> would prefer would be to avoid the need to do that and just make the
> (maybe fairly small) change to svnserve itself to make it possible to
> shut it down via a signal or something.

Just FYI: it's not just the win32 service code for svnserve that would
require such a feature. The whole Subversion library should have such a
feature too, because UI clients must call those API's on a different
thread (to not block the UI while e.g. checking out a working copy). If
the user then wants to cancel that operation, UI clients now have to
rely on the 'cancel' callback Subversion provides. But that isn't called
too often, and if e.g. a network operation is stuck, that callback isn't
called until the connection times out (which for the user is way too
long and makes the whole app appear to hang).

I've tried the apr function apr_pool_cleanup_for_exec(), which *would*
be the perfect candidate for this (I think):

/* Preparing for exec() --- close files, etc., but *don't* flush I/O
  * buffers, *don't* wait for subprocesses, and *don't* free any memory.
  */
/**
  * Run all of the child_cleanups, so that any unnecessary files are
  * closed because we are about to exec a new program
  */

So that function closes all handles, without freeing the memory. That
way blocking networking calls would exit, and the library still could do
a proper cleanup and exit its function.

But: that function is not compiled on Windows and OS2. :(

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 25 00:24:01 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.