1 /* Copyright 2001-2004 Roger Dingledine.
2 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3 * Copyright (c) 2007-2019, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
7 #ifdef ENABLE_RESTART_DEBUGGING
13 * \brief Stub module containing a main() function.
15 * We keep the main function in a separate module so that the unit
16 * tests, which have their own main()s, can link against main.c.
19 int tor_main(int argc
, char *argv
[]);
21 /** We keep main() in a separate file so that our unit tests can use
22 * functions from main.c.
25 main(int argc
, char *argv
[])
28 #ifdef ENABLE_RESTART_DEBUGGING
29 int restart_count
= getenv("TOR_DEBUG_RESTART") ? 1 : 0;
32 r
= tor_main(argc
, argv
);
35 #ifdef ENABLE_RESTART_DEBUGGING
36 else if (r
== 0 && restart_count
--)