[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: David James <james82_at_gmail.com>
Date: 2005-08-03 02:31:15 CEST

On 8/2/05, Greg Hudson <ghudson@mit.edu> wrote:
> On Tue, 2005-08-02 at 18:41 -0400, 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. How do you suggest we deal with
> > other signals, such as SIGTERM and SIGHUP?
>
> Why does it sound like a good solution? It's the easy way out; we'll be
> creating a bunch of unclean exit situations because we're too lazy to
> engineer a proper solution.
I like Julian's idea because it's simple -- he's not overengineering.
His solution sounds like it will be simple and very portable.

In the case of the SIGINT handler, I'm not that worried about unclean
exit situations -- it's common and expected for programs to exit
uncleanly if you tap CTRL-C multiple times. That's why the operating
system aborts the program by default if you tap CTRL-C. (The SIGHUP
and SIGTERM signals may need to be handled more carefully.)

Other ideas?

Cheers,

David

-- 
David James -- http://www.cs.toronto.edu/~james
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 3 02:32:17 2005

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