diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-06-03 09:09:50 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-06-03 09:09:50 +0000 |
commit | 84bcdbdd34bfa4d597ae2635146fe15631b46f44 (patch) | |
tree | a3287378e973e816ec08f79f47b6012327fb066c /src/exit | |
parent | af4dff0ff8a129c05c75180446b691a0b2cd74c7 (diff) | |
download | gnunet-84bcdbdd34bfa4d597ae2635146fe15631b46f44.tar.gz gnunet-84bcdbdd34bfa4d597ae2635146fe15631b46f44.zip |
keep exit process running even if it cannot work to avoid ARM restarts
Diffstat (limited to 'src/exit')
-rw-r--r-- | src/exit/gnunet-daemon-exit.c | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index 882c6a373..a76f506ee 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c | |||
@@ -3114,11 +3114,31 @@ free_iterate (void *cls, | |||
3114 | 3114 | ||
3115 | 3115 | ||
3116 | /** | 3116 | /** |
3117 | * Function scheduled as very last function if the service | ||
3118 | * disabled itself because the helper is not installed | ||
3119 | * properly. Does nothing, except for keeping the | ||
3120 | * service process alive by virtue of being scheduled. | ||
3121 | * | ||
3122 | * @param cls NULL | ||
3123 | * @param tc scheduler context | ||
3124 | */ | ||
3125 | static void | ||
3126 | dummy_task (void *cls, | ||
3127 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
3128 | { | ||
3129 | /* just terminate */ | ||
3130 | } | ||
3131 | |||
3132 | |||
3133 | /** | ||
3117 | * Function scheduled as very last function, cleans up after us | 3134 | * Function scheduled as very last function, cleans up after us |
3135 | * | ||
3136 | * @param cls NULL | ||
3137 | * @param tc scheduler context | ||
3118 | */ | 3138 | */ |
3119 | static void | 3139 | static void |
3120 | cleanup (void *cls, | 3140 | cleanup (void *cls, |
3121 | const struct GNUNET_SCHEDULER_TaskContext *tskctx) | 3141 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
3122 | { | 3142 | { |
3123 | unsigned int i; | 3143 | unsigned int i; |
3124 | 3144 | ||
@@ -3511,8 +3531,11 @@ run (void *cls, | |||
3511 | { | 3531 | { |
3512 | GNUNET_free (binary); | 3532 | GNUNET_free (binary); |
3513 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 3533 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
3514 | _("`%s' must be installed SUID, refusing to run\n"), | 3534 | _("`%s' must be installed SUID, EXIT will not work\n"), |
3515 | "gnunet-helper-exit"); | 3535 | "gnunet-helper-exit"); |
3536 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | ||
3537 | &dummy_task, | ||
3538 | NULL); | ||
3516 | global_ret = 1; | 3539 | global_ret = 1; |
3517 | return; | 3540 | return; |
3518 | } | 3541 | } |
@@ -3601,7 +3624,9 @@ run (void *cls, | |||
3601 | app_idx++; | 3624 | app_idx++; |
3602 | } | 3625 | } |
3603 | GNUNET_free_non_null (dns_exit); | 3626 | GNUNET_free_non_null (dns_exit); |
3604 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup, cls); | 3627 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
3628 | &cleanup, | ||
3629 | cls); | ||
3605 | 3630 | ||
3606 | if (GNUNET_OK != | 3631 | if (GNUNET_OK != |
3607 | GNUNET_CONFIGURATION_get_value_number (cfg, "exit", "MAX_CONNECTIONS", | 3632 | GNUNET_CONFIGURATION_get_value_number (cfg, "exit", "MAX_CONNECTIONS", |