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>
Этот коммит содержится в:
родитель
407a5ba84c
Коммит
0eb370de2e
@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user