1
1

check SIGINT/SIGTERM/SIGHUP defined before using them

since not all platform define these signal number

Part of #935.

Change-Id: I98f14590ad45d1fe7e61076cce5a76b7874772ea
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
(cherry picked from commit d4267b66b5550c0e4cfec60439eab1d57a4a0c7a)
Signed-off-by: Bruce A. Mah <bmah@es.net>
Этот коммит содержится в:
Xiang Xiao 2019-11-16 23:24:03 +08:00 коммит произвёл Bruce A. Mah
родитель 407a5ba84c
Коммит 0eb370de2e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4984910A8CAAEE8A

Просмотреть файл

@ -3862,9 +3862,15 @@ diskfile_recv(struct iperf_stream *sp)
void
iperf_catch_sigend(void (*handler)(int))
{
#ifdef SIGINT
signal(SIGINT, handler);
#endif
#ifdef SIGTERM
signal(SIGTERM, handler);
#endif
#ifdef SIGHUP
signal(SIGHUP, handler);
#endif
}
/**