]> jfr.im git - irc/gunnarbeutner/shroudbnc.git/commitdiff
Fix incorrect if condition in CCore::Daemonize().
authorGunnar Beutner <redacted>
Wed, 5 Feb 2014 18:08:02 +0000 (19:08 +0100)
committerGunnar Beutner <redacted>
Thu, 6 Feb 2014 08:04:22 +0000 (09:04 +0100)
src/Core.cpp

index cf4d5effea9a15303db7a96598f3fb6979afc3bb..0e0ce6ad8abdfb9d36999d24a36da02c99c291ca 100644 (file)
@@ -2350,7 +2350,7 @@ bool CCore::Daemonize(void) {
        }
 
        fd = open("/dev/null", O_RDWR);
-       if (fd) {
+       if (fd >= 0) {
                if (fd != 0) {
                        dup2(fd, 0);
                }