aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 904a9b1e1..b77b4d63d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1494,7 +1494,14 @@ main (gint argc, gchar **argv, gchar **env)
sigaction (SIGINT, &signals, NULL);
sigprocmask (SIG_UNBLOCK, &signals.sa_mask, NULL);
/* Set alarm for hard termination */
- set_alarm (HARD_TERMINATION_TIME);
+ if (getenv ("G_SLICE") != NULL) {
+ /* Special case if we are likely running with valgrind */
+ set_alarm (HARD_TERMINATION_TIME * 10);
+ }
+ else {
+ set_alarm (HARD_TERMINATION_TIME);
+ }
+
/* Wait for workers termination */
g_hash_table_foreach_remove (rspamd_main->workers, wait_for_workers, NULL);