1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Allow signals to interrupt system calls.

Remove redundant signal() call.

PR:		6676
Submitted by:	luoqi
Reviewed by:	Ari Suutari <ari@suutari.iki.fi>
This commit is contained in:
Ruslan Ermilov 1999-09-02 15:17:25 +00:00
parent 8b18acc0df
commit cd45c931f6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50810

View File

@ -286,6 +286,8 @@ int main (int argc, char** argv)
* Catch signals to manage shutdown and
* refresh of interface address.
*/
siginterrupt(SIGTERM, 1);
siginterrupt(SIGHUP, 1);
signal (SIGTERM, InitiateShutdown);
signal (SIGHUP, RefreshAddr);
/*
@ -816,7 +818,6 @@ void Warn (const char* msg)
static void RefreshAddr (int sig)
{
signal (SIGHUP, RefreshAddr);
if (ifName)
assignAliasAddr = 1;
}
@ -828,6 +829,7 @@ static void InitiateShutdown (int sig)
* shutdown existing connections when system
* is shut down.
*/
siginterrupt(SIGALRM, 1);
signal (SIGALRM, Shutdown);
alarm (10);
}