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

Re: [PATCH] Add a SIGINT handler.

From: mark benedetto king <bking_at_inquira.com>
Date: 2002-08-01 15:23:03 CEST

On Thu, Aug 01, 2002 at 09:59:22AM +0200, brane@xbc.nu wrote:
> I'm not sure this is a good thing. Could we do something similar to what
> the BDB utilities are doing? (Look at __db_util_sigint in
> common/utl_sig.c in the BDB sources).

I think you meant __db_util_siginit(). :-)

To save other people the trouble of looking, the strategy there
is to set a status variable when the SIGINT is received, and
check it at various places, so that a graceful exit can be

BTW: That code looks spectacularly buggy to me. I don't see
how it would work, but I do think I see the *intent* of the
code. I think __db_util_sigresend() is also broken. If someone
else wants to eyeball it, I'd appreciate it, if only to make
me feel less crazy.

I knew you would suggest this, because you suggested it on IRC. :-)

I thought this simple patch was an expedient way solve the
immediate problem of wedged ra_locals.

The other approach dovetails nicely with the GUI "cancel" button; we
need a client->interrupted() vtable entry so that GUI users can cancel
long-running operations. The cmdline client would use a signal handler
to set the flag that this predicate would take. The GUI would do it
on a button press. We'd check the flag frequently. Ideally, blocking
operations that could potentially be length would be made non-blocking,
and we'd use select() or something to economically poll both the operation
and client->interrupted(). It is my assumption that neon already does
something much like this in order to implement its timeout functionality.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 1 19:53:10 2002

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.