On Mon, Apr 27, 2015 at 3:00 AM, Michael Forney mfor...@mforney.org wrote:
---
Thanks for contributing! I have applied both patches and added you to
the LICENSE file.
Kind regards,
Hiltjo
Michael Forney wrote:
+ if(!forked) {
+ if(fork())
+ exit(EXIT_SUCCESS);
+ forked = 1;
+ }
Heyho,
why not:
if(!forked fork())
exit(EXIT_SUCCESS);
forked = 1;
You could also use
if(!forked
---
sdhcp.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sdhcp.c b/sdhcp.c
index aa3cef2..9ff9baf 100644
--- a/sdhcp.c
+++ b/sdhcp.c
@@ -339,6 +339,8 @@ acceptlease(void)
static void
run(void)
{
+ int forked = 0;
+
#if 0
InitReboot:
/* send