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).
mark benedetto king wrote:
>When a user presses Ctrl-C while using ra_local, it is not
>uncommon for the repository to be left in a "wedged" state.
>This can be prevented by ignoring SIGINT.
>
>It might be more appropriate to do this in ra_local->open(),
>since it's really only necessary for local operations.
>
>* subversion/clients/cmdline/main.c
> (main): set the signal handler for SIGINT to SIG_IGN.
>
>Index: subversion/clients/cmdline/main.c
>===================================================================
>--- subversion/clients/cmdline/main.c
>+++ subversion/clients/cmdline/main.c Wed Jul 31 22:17:55 2002
>@@ -29,6 +29,7 @@
> #include <apr_strings.h>
> #include <apr_tables.h>
> #include <apr_general.h>
>+#include <apr_signal.h>
> #include <apr_lib.h>
>
> #include "svn_pools.h"
>@@ -894,6 +895,13 @@
> return EXIT_FAILURE;
> }
>
>+ /* Ignore interrupts. This should cut down on repository wedges
>+ for ra_local. */
>+ if (apr_signal(SIGINT, SIG_IGN) == SIG_ERR)
>+ {
>+ fprintf(stderr, "error: couldn't establish signal handler\n");
>+ }
>+
> /* Create our top-level pool. */
> pool = svn_pool_create (NULL);
>
--
Brane Čibej <brane_at_xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 1 10:16:04 2002