aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-12-11 10:57:00 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-19 09:52:05 -0500
commit97d9ba2380e0c894a1b611bdb4f35d0fe98a837a (patch)
treed1a9593e143ad0e5aa78cca0e876c03baad29aa9 /configure.ac
parentea929e8456d065a25d7eb5e2e0e41e0f303ebe9d (diff)
downloadtor-97d9ba2380e0c894a1b611bdb4f35d0fe98a837a.tar.gz
tor-97d9ba2380e0c894a1b611bdb4f35d0fe98a837a.zip
Add a mostly disabled feature to debug restarting in-process
For 23847, we want Tor to be able to shut down and then restart in the same process. Here's a patch to make the Tor binary do that. To test it, you need to build with --enable-restart-debugging, and then you need to set the environment variable TOR_DEBUG_RESTART. With this option, Tor will then run for 5 seconds, then restart itself in-process without exiting. This only happens once. You can change the 5-second interval using TOR_DEBUG_RESTART_AFTER_SECONDS. Implements ticket 24583.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ee75d3a29e..36a27b54bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,8 @@ AC_ARG_ENABLE(rust,
AS_HELP_STRING(--enable-rust, [enable rust integration]))
AC_ARG_ENABLE(cargo-online-mode,
AS_HELP_STRING(--enable-cargo-online-mode, [Allow cargo to make network requests to fetch crates. For builds with rust only.]))
+AC_ARG_ENABLE(restart-debugging,
+ AS_HELP_STRING(--enable-restart-debugging, [Build Tor with support for debugging in-process restart. Developers only.]))
if test "x$enable_coverage" != "xyes" -a "x$enable_asserts_in_tests" = "xno" ; then
AC_MSG_ERROR([Can't disable assertions outside of coverage build])
@@ -107,6 +109,10 @@ AC_ARG_ENABLE(systemd,
* ) AC_MSG_ERROR(bad value for --enable-systemd) ;;
esac], [systemd=auto])
+if test "$enable_restart_debugging" = "yes"; then
+ AC_DEFINE(ENABLE_RESTART_DEBUGGING, 1,
+ [Defined if we're building with support for in-process restart debugging.])
+fi
# systemd support