Fixed daemonization bugs.
authorPeter Barfuss <pbarfuss@maltodextrin.csclub.uwaterloo.ca>
Fri, 16 Mar 2012 08:24:07 +0000 (04:24 -0400)
committerPeter Barfuss <pbarfuss@maltodextrin.csclub.uwaterloo.ca>
Fri, 16 Mar 2012 08:24:07 +0000 (04:24 -0400)
rrdtool/mirror-rrd.c

index 24c46aa..edf46ed 100644 (file)
@@ -9,6 +9,9 @@ int main(void) {
                case -1:
                        return -1;
                case 0:
+                       close(0);
+                       close(1);
+                       setsid();
                        break;
                default:
                        _exit(0);