subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1727621 - in /subversion/trunk/subversion: svn/svn.c svnadmin/svnadmin.c svnbench/svnbench.c svnfsfs/svnfsfs.c svnlook/svnlook.c svnrdump/svnrdump.c svnsync/svnsync.c
Date Fri, 29 Jan 2016 18:55:22 GMT
Author: philip
Date: Fri Jan 29 18:55:22 2016
New Revision: 1727621

URL: http://svn.apache.org/viewvc?rev=1727621&view=rev
Log:
* subversion/svn/svn.c
* subversion/svnadmin/svnadmin.c
* subversion/svnbench/svnbench.c
* subversion/svnfsfs/svnfsfs.c
* subversion/svnlook/svnlook.c
* subversion/svnrdump/svnrdump.c
* subversion/svnsync/svnsync.c
  (main): Exit via SIGINT when SIGINT is caught.

Modified:
    subversion/trunk/subversion/svn/svn.c
    subversion/trunk/subversion/svnadmin/svnadmin.c
    subversion/trunk/subversion/svnbench/svnbench.c
    subversion/trunk/subversion/svnfsfs/svnfsfs.c
    subversion/trunk/subversion/svnlook/svnlook.c
    subversion/trunk/subversion/svnrdump/svnrdump.c
    subversion/trunk/subversion/svnsync/svnsync.c

Modified: subversion/trunk/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=1727621&r1=1727620&r2=1727621&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/svn.c (original)
+++ subversion/trunk/subversion/svn/svn.c Fri Jan 29 18:55:22 2016
@@ -30,6 +30,11 @@
 #include <string.h>
 #include <assert.h>
 
+#ifndef WIN32
+#include <signal.h>
+#include <unistd.h>
+#endif
+
 #include <apr_strings.h>
 #include <apr_tables.h>
 #include <apr_general.h>
@@ -3142,5 +3147,15 @@ main(int argc, const char *argv[])
     }
 
   svn_pool_destroy(pool);
+
+#ifndef WIN32
+  /* If cancelled by SIGINT then attempt to exit via SIGINT.  This
+     allows the shell to use WIFSIGNALED and WTERMSIG to detect the
+     SIGINT.  See http://www.cons.org/cracauer/sigint.html  */
+  if (cancelled && apr_signal(SIGINT, SIG_DFL) == APR_SUCCESS)
+    /* No APR support for getpid() so cannot use apr_proc_kill(). */
+    kill(getpid(), SIGINT);
+#endif
+
   return exit_code;
 }

Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1727621&r1=1727620&r2=1727621&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Fri Jan 29 18:55:22 2016
@@ -25,6 +25,11 @@
 #include <apr_file_io.h>
 #include <apr_signal.h>
 
+#ifndef WIN32
+#include <signal.h>
+#include <unistd.h>
+#endif
+
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_cmdline.h"
@@ -3030,5 +3035,15 @@ main(int argc, const char *argv[])
     }
 
   svn_pool_destroy(pool);
+
+#ifndef WIN32
+  /* If cancelled by SIGINT then attempt to exit via SIGINT.  This
+     allows the shell to use WIFSIGNALED and WTERMSIG to detect the
+     SIGINT.  See http://www.cons.org/cracauer/sigint.html  */
+  if (cancelled && apr_signal(SIGINT, SIG_DFL) == APR_SUCCESS)
+    /* No APR support for getpid() so cannot use apr_proc_kill(). */
+    kill(getpid(), SIGINT);
+#endif
+
   return exit_code;
 }

Modified: subversion/trunk/subversion/svnbench/svnbench.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnbench/svnbench.c?rev=1727621&r1=1727620&r2=1727621&view=diff
==============================================================================
--- subversion/trunk/subversion/svnbench/svnbench.c (original)
+++ subversion/trunk/subversion/svnbench/svnbench.c Fri Jan 29 18:55:22 2016
@@ -30,6 +30,11 @@
 #include <string.h>
 #include <assert.h>
 
+#ifndef WIN32
+#include <signal.h>
+#include <unistd.h>
+#endif
+
 #include <apr_signal.h>
 
 #include "svn_cmdline.h"
@@ -1047,5 +1052,15 @@ main(int argc, const char *argv[])
     }
 
   svn_pool_destroy(pool);
+
+#ifndef WIN32
+  /* If cancelled by SIGINT then attempt to exit via SIGINT.  This
+     allows the shell to use WIFSIGNALED and WTERMSIG to detect the
+     SIGINT.  See http://www.cons.org/cracauer/sigint.html  */
+  if (cancelled && apr_signal(SIGINT, SIG_DFL) == APR_SUCCESS)
+    /* No APR support for getpid() so cannot use apr_proc_kill(). */
+    kill(getpid(), SIGINT);
+#endif
+
   return exit_code;
 }

Modified: subversion/trunk/subversion/svnfsfs/svnfsfs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnfsfs/svnfsfs.c?rev=1727621&r1=1727620&r2=1727621&view=diff
==============================================================================
--- subversion/trunk/subversion/svnfsfs/svnfsfs.c (original)
+++ subversion/trunk/subversion/svnfsfs/svnfsfs.c Fri Jan 29 18:55:22 2016
@@ -23,6 +23,11 @@
 
 #include <apr_signal.h>
 
+#ifndef WIN32
+#include <signal.h>
+#include <unistd.h>
+#endif
+
 #include "svn_pools.h"
 #include "svn_cmdline.h"
 #include "svn_opt.h"
@@ -537,5 +542,15 @@ main(int argc, const char *argv[])
     }
 
   svn_pool_destroy(pool);
+
+#ifndef WIN32
+  /* If cancelled by SIGINT then attempt to exit via SIGINT.  This
+     allows the shell to use WIFSIGNALED and WTERMSIG to detect the
+     SIGINT.  See http://www.cons.org/cracauer/sigint.html  */
+  if (cancelled && apr_signal(SIGINT, SIG_DFL) == APR_SUCCESS)
+    /* No APR support for getpid() so cannot use apr_proc_kill(). */
+    kill(getpid(), SIGINT);
+#endif
+
   return exit_code;
 }

Modified: subversion/trunk/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnlook/svnlook.c?rev=1727621&r1=1727620&r2=1727621&view=diff
==============================================================================
--- subversion/trunk/subversion/svnlook/svnlook.c (original)
+++ subversion/trunk/subversion/svnlook/svnlook.c Fri Jan 29 18:55:22 2016
@@ -30,6 +30,11 @@
 #include <apr_file_io.h>
 #include <apr_signal.h>
 
+#ifndef WIN32
+#include <signal.h>
+#include <unistd.h>
+#endif
+
 #define APR_WANT_STDIO
 #define APR_WANT_STRFUNC
 #include <apr_want.h>
@@ -2883,5 +2888,15 @@ main(int argc, const char *argv[])
     }
 
   svn_pool_destroy(pool);
+
+#ifndef WIN32
+  /* If cancelled by SIGINT then attempt to exit via SIGINT.  This
+     allows the shell to use WIFSIGNALED and WTERMSIG to detect the
+     SIGINT.  See http://www.cons.org/cracauer/sigint.html  */
+  if (cancelled && apr_signal(SIGINT, SIG_DFL) == APR_SUCCESS)
+    /* No APR support for getpid() so cannot use apr_proc_kill(). */
+    kill(getpid(), SIGINT);
+#endif
+
   return exit_code;
 }

Modified: subversion/trunk/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/svnrdump.c?rev=1727621&r1=1727620&r2=1727621&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/svnrdump.c (original)
+++ subversion/trunk/subversion/svnrdump/svnrdump.c Fri Jan 29 18:55:22 2016
@@ -25,6 +25,11 @@
 #include <apr_signal.h>
 #include <apr_uri.h>
 
+#ifndef WIN32
+#include <signal.h>
+#include <unistd.h>
+#endif
+
 #include "svn_pools.h"
 #include "svn_cmdline.h"
 #include "svn_client.h"
@@ -1157,5 +1162,15 @@ main(int argc, const char *argv[])
     }
 
   svn_pool_destroy(pool);
+
+#ifndef WIN32
+  /* If cancelled by SIGINT then attempt to exit via SIGINT.  This
+     allows the shell to use WIFSIGNALED and WTERMSIG to detect the
+     SIGINT.  See http://www.cons.org/cracauer/sigint.html  */
+  if (cancelled && apr_signal(SIGINT, SIG_DFL) == APR_SUCCESS)
+    /* No APR support for getpid() so cannot use apr_proc_kill(). */
+    kill(getpid(), SIGINT);
+#endif
+
   return exit_code;
 }

Modified: subversion/trunk/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/svnsync.c?rev=1727621&r1=1727620&r2=1727621&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/svnsync.c (original)
+++ subversion/trunk/subversion/svnsync/svnsync.c Fri Jan 29 18:55:22 2016
@@ -46,6 +46,11 @@
 #include <apr_signal.h>
 #include <apr_uuid.h>
 
+#ifndef WIN32
+#include <signal.h>
+#include <unistd.h>
+#endif
+
 static svn_opt_subcommand_t initialize_cmd,
                             synchronize_cmd,
                             copy_revprops_cmd,
@@ -2470,5 +2475,15 @@ main(int argc, const char *argv[])
     }
 
   svn_pool_destroy(pool);
+
+#ifndef WIN32
+  /* If cancelled by SIGINT then attempt to exit via SIGINT.  This
+     allows the shell to use WIFSIGNALED and WTERMSIG to detect the
+     SIGINT.  See http://www.cons.org/cracauer/sigint.html  */
+  if (cancelled && apr_signal(SIGINT, SIG_DFL) == APR_SUCCESS)
+    /* No APR support for getpid() so cannot use apr_proc_kill(). */
+    kill(getpid(), SIGINT);
+#endif
+
   return exit_code;
 }



Mime
View raw message