Use signal-safe _exit in signal handler - sdhcp - simple dhcp client
(HTM) git clone git://git.codemadness.org/sdhcp
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 450beea4e88ab7f80206741f18f0d5539ae60b44
(DIR) parent a3a3e615d0e66b388b436196863095aede5c9dbe
(HTM) Author: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Thu, 28 Jul 2016 23:22:53 +0200
Use signal-safe _exit in signal handler
The call to exit is not signal-safe, therefore _exit should be called
from within signal handlers.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Diffstat:
M sdhcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/sdhcp.c b/sdhcp.c
@@ -428,7 +428,7 @@ void cleanexit(int unused)
{
(void) unused;
dhcpsend(DHCPrelease, Unicast);
- exit(0);
+ _exit(0);
}
static void