diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-06 17:06:38 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-07 16:46:15 +0000 |
commit | 9ed3649c70ce2dec90f502ec09d13475ee09feb3 (patch) | |
tree | ac3363c4b845373153537842edc4c3a8fbdf2bfc /testing/prayer/sighandling.patch | |
parent | 9d88ce130db0c33108802cd61cb032cc26cec440 (diff) | |
download | aports-9ed3649c70ce2dec90f502ec09d13475ee09feb3.tar.bz2 aports-9ed3649c70ce2dec90f502ec09d13475ee09feb3.tar.xz |
unmaintained/preayer: moved from testing
appears to be dead upstream
Diffstat (limited to 'testing/prayer/sighandling.patch')
-rw-r--r-- | testing/prayer/sighandling.patch | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/testing/prayer/sighandling.patch b/testing/prayer/sighandling.patch deleted file mode 100644 index e7916ea80b..0000000000 --- a/testing/prayer/sighandling.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/lib/os.h -+++ b/lib/os.h -@@ -44,6 +44,8 @@ BOOL os_signal_alarm_clear(void); - - BOOL os_signal_init(); - -+BOOL os_signal_hup_term_init(void (*hup_fn) (), void (*term_fn) ()); -+ - BOOL os_lock_exclusive(int fd); - - BOOL os_lock_shared(int fd); ---- a/servers/session_server.c -+++ b/servers/session_server.c -@@ -286,6 +286,7 @@ BOOL session_server(struct config *confi - fd_set readfds; - pid_t child; - unsigned long timeout = 0L; -+ BOOL sighup_seen = NIL; - - if (config->direct_enable) { - ssl_portlist -@@ -348,6 +349,18 @@ BOOL session_server(struct config *confi - } else { - rc = select(maxfd + 1, &readfds, NIL, NIL, NIL); - } -+ if (sighup_seen) { -+ log_misc("SIGHUP received - reexec daemon"); -+ close(sockfd); -+ if (config->direct_enable) { -+ /* Find some way to pass this information along -+ to the new invocation somehow later. */ -+ portlist_close_all(ssl_portlist); -+ portlist_close_all(plain_portlist); -+ } -+ log_misc_free(); -+ return (T); -+ } - } - while ((rc < 0) && (errno == EINTR)); - ---- a/shared/log.c -+++ b/shared/log.c -@@ -502,6 +502,13 @@ BOOL log_misc_init(struct config *config - return (log_open(log_misc_ptr, log_name)); - } - -+void log_misc_free() -+{ -+ if ((log_misc_ptr == NIL) || (log_misc_ptr->fd < 0)) -+ return; -+ log_free(log_misc_ptr); -+} -+ - /* log_misc_ping() ******************************************************* - * - * Reopen misc log file if required ---- a/shared/log.h -+++ b/shared/log.h -@@ -45,6 +45,8 @@ void log_record_peer_pid(struct log *log - BOOL - log_misc_init(struct config *config, char *progname, char *misc_log_name); - -+void log_misc_free(); -+ - BOOL log_misc_ping(); - - void log_misc(char *fmt, ...); |