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

Re: permissions (and other) problems

From: mark benedetto king <bking_at_inquira.com>
Date: 2002-09-12 16:28:33 CEST

On Thu, Sep 12, 2002 at 10:09:49AM -0400, Garrett Rooney wrote:
> > I posted a kludgey patch to prevent that a few months ago;
> > it just ignored the SIGINT. It did this even on ra_dav, though, which
> > was probably overkill.
> >
> > Maybe the work should have been done in svn_ra_local_init().
> > What do you think?
>
> Isn't this the kind of situation that the cancelation editor that Bill
> Tutt wrote a while back would be used for?
>

Right. You could have something like

static svn_boolean_t cancelled = FALSE;

static void
siginthandler(int sig)
{
  cancelled = TRUE;
}

svn_boolean_t
is_cancelled() {
  return cancelled;
}

and just pass "is_cancelled" as a client callback to the cancellable
functions.

I strongly believe that the client API needs to be widened to support
a more easily extensible callback mechanism; right now, most callbacks
are passed as parameters (rather than in a structure, like the
auth_baton). This means that every callback we want to add will have
ripple-effects through the code, and break the published client API.

> To provide a means for the client application to indicate that it wants
> the library to stop whatever it was doing and clean up.
>

Yes, but then you need to check for the cancellation every so often,
which can be painful.

Also, if the application is actually blocked on a long-running operation
(maybe the database is already wedged, for example), this approach won't
work. Maybe BDB provides some asynchronous accessors...

> I seem to remember it being removed a while back (and i'm not sure why),
> but it does seem like there needs to be some means of providing this
> functionality, both for the command line client and control-c, and for a
> gui client with a dialog where you can just hit cancel.

Yes, it would be nice to have a client-independent solution.

--ben

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 12 16:35:48 2002

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