blob: b2fb4e66d0c79a8d53fe09469ada098dc6bacaa1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
diff -ur a/noip2.c b/noip2.c
--- a/noip2.c 2004-01-09 14:18:39.000000000 +0000
+++ b/noip2.c 2007-07-20 14:02:41.100377515 +0100
@@ -895,16 +895,13 @@
char *err_string;
static int startup = 1;
- x = fork();
+ x = daemon (0, 0);
switch (x) {
case -1: // error
err_string = strerror(errno);
Msg( "Can't fork!! (%s) Ending!\n", err_string);
return FATALERR;
- default: // parent
- exit(0);
case 0: //child
- setsid();
if (get_shm_info() == FATALERR)
return FATALERR;
log2syslog++;
|