Use signal-safe _exit in signal handler - sdhcp - simple dhcp client | |
git clone git://git.codemadness.org/sdhcp | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 450beea4e88ab7f80206741f18f0d5539ae60b44 | |
parent a3a3e615d0e66b388b436196863095aede5c9dbe | |
Author: Tobias Stoeckmann <[email protected]> | |
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 <[email protected]> | |
Diffstat: | |
M sdhcp.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
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 |