]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/daemon.c
Use the command line utility dropdb instead of the psql command
[bacula/bacula] / bacula / src / lib / daemon.c
index d56287bdbdcfb9e1324ec7cf224d719d80aaaac3..20dc2fdf52fb733cd95b327cb39dfa22d71824eb 100644 (file)
@@ -41,7 +41,7 @@ daemon_start()
 {
 #ifndef HAVE_CYGWIN
    int i;
-   int cpid;
+   pid_t cpid;
    mode_t oldmask;
    /*
     *  Become a daemon.
@@ -59,7 +59,7 @@ daemon_start()
    /* In the PRODUCTION system, we close ALL
     * file descriptors except stdin, stdout, and stderr.
     */
-   for (i=sysconf(_SC_OPEN_MAX)-1; i >= 3; i--) {
+   for (i=sysconf(_SC_OPEN_MAX)-1; i > 2; i--) {
       close(i);
    }