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

Re: Client hangs when svnserve does not respond

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-08-03 01:51:47 CEST

David James wrote:
> On 8/2/05, Julian Foad <julianfoad@btopenworld.com> wrote:
>
>>The problem, as I understand it, is that in several different cases the user
>>can't interrupt Subversion during a system call that is taking too long. This
>>is because our SIGINT handler just sets a flag when they press Ctrl-C and
>>doesn't do anything else. We should be able to modify our SIGINT handler to
>>avoid that problem. It should set the flag, and then arrange that if a second
>>SIGINT should be received, it will unconditionally terminate the application.
>>It can probably do so by uninstalling itself, so that any future SIGINT has the
>>default handling. [*]
>
> This sounds like a good solution.

Thanks. Sadly I'm in no position to write the patch.

> How do you suggest we deal with
> other signals, such as SIGTERM and SIGHUP?

I have never thought about them. I suppose what you are thinking is that they
also ought to give Subversion a chance to clean up rather than just abort
uncleanly. The only thing I can think of, off the top of my head, is to
install handlers for them that set the "interrupted" flag and then start an
operating-sytem-provided timer that will send some untrapped signal after one
second (or ten or whatever) to kill the application. If the application
reaches its normal exit before that, it will deactivate the timer. The
feasibility of this approach depends on whether suitable facilities are
provided by the operating system. I've no idea whether they are.

However, we should not let the thought of improving our response to those other
signals distract us from handling SIGINT (Ctrl-C) as best we can.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 3 01:52:48 2005

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.