projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ignore signals in all but the main thread.
[tinc]
/
src
/
tincd.c
diff --git
a/src/tincd.c
b/src/tincd.c
index
c4750da
..
9518676
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-110,6
+110,8
@@
static struct option const long_options[] = {
{NULL, 0, NULL, 0}
};
{NULL, 0, NULL, 0}
};
+mutex_t mutex;
+
#ifdef HAVE_MINGW
static struct WSAData wsa_state;
CRITICAL_SECTION mutex;
#ifdef HAVE_MINGW
static struct WSAData wsa_state;
CRITICAL_SECTION mutex;
@@
-381,13
+383,11
@@
int main(int argc, char **argv) {
openlogger("tinc", use_logfile?LOGMODE_FILE:LOGMODE_STDERR);
openlogger("tinc", use_logfile?LOGMODE_FILE:LOGMODE_STDERR);
- if(!event_init()) {
- logger(LOG_ERR, "Error initializing libevent!");
- return 1;
- }
-
g_argv = argv;
g_argv = argv;
+ mutex_create(&mutex);
+ mutex_lock(&mutex);
+ init_events();
init_configuration(&config_tree);
/* Slllluuuuuuurrrrp! */
init_configuration(&config_tree);
/* Slllluuuuuuurrrrp! */
@@
-495,6
+495,7
@@
end:
crypto_exit();
exit_configuration(&config_tree);
crypto_exit();
exit_configuration(&config_tree);
+ exit_events();
free_names();
return status;
free_names();
return status;