diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-20 15:19:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-21 09:14:06 -0400 |
commit | c7ce6b9821be22e734b79e07e318f2bfba32722d (patch) | |
tree | 0582d70285c6fcd33f9804af6684f8de27273c36 /src/app/main/main.h | |
parent | 98ef3e82e48c2d57c09d5f551b72e7d6bfe5347a (diff) | |
download | tor-c7ce6b9821be22e734b79e07e318f2bfba32722d.tar.gz tor-c7ce6b9821be22e734b79e07e318f2bfba32722d.zip |
Split main.c into main.c and mainloop.c
The main.c code is responsible for initialization and shutdown;
the mainloop.c code is responsible for running the main loop of Tor.
Splitting the "generic event loop" part of mainloop.c from the
event-loop-specific part is not done as part of this patch.
Diffstat (limited to 'src/app/main/main.h')
-rw-r--r-- | src/app/main/main.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/app/main/main.h b/src/app/main/main.h new file mode 100644 index 0000000000..b64f2ef417 --- /dev/null +++ b/src/app/main/main.h @@ -0,0 +1,29 @@ +/* Copyright (c) 2001 Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2018, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file main.h + * \brief Header file for main.c. + **/ + +#ifndef TOR_MAIN_H +#define TOR_MAIN_H + +void handle_signals(void); +void activate_signal(int signal_num); + +int try_locking(const or_options_t *options, int err_if_locked); +int have_lockfile(void); +void release_lockfile(void); + +void tor_remove_file(const char *filename); + +void tor_cleanup(void); +void tor_free_all(int postfork); + +int tor_init(int argc, char **argv); + +#endif /* !defined(TOR_MAIN_H) */ |