From 9869f6dc5af85caf2e0fd4c56713a7f2049ecfff Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Sat, 11 Apr 2020 08:35:05 +0200 Subject: tests/server: move all signal handling routines to util.[ch] Avoid code duplication to prepare for portability enhancements. --- tests/server/util.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/server/util.h') diff --git a/tests/server/util.h b/tests/server/util.h index 0ae61aee5..0446b6a84 100644 --- a/tests/server/util.h +++ b/tests/server/util.h @@ -66,4 +66,13 @@ void clear_advisor_read_lock(const char *filename); int strncasecompare(const char *first, const char *second, size_t max); +/* global variable which if set indicates that the program should finish */ +extern volatile int got_exit_signal; + +/* global variable which if set indicates the first signal handled */ +extern volatile int exit_signal; + +void install_signal_handlers(bool keep_sigalrm); +void restore_signal_handlers(bool keep_sigalrm); + #endif /* HEADER_CURL_SERVER_UTIL_H */ -- cgit v1.2.3