Fix compile with -DNOFORK
authorWouter Verhelst <w@uter.be>
Thu, 22 Jul 2010 13:22:47 +0000 (15:22 +0200)
committerWouter Verhelst <w@uter.be>
Thu, 22 Jul 2010 13:22:47 +0000 (15:22 +0200)
nbd-client.c

index 97c8048..7aceb3e 100644 (file)
@@ -343,7 +343,9 @@ int main(int argc, char *argv[]) {
        
 #ifndef NOFORK
        if(!nofork) daemon(0,0);
        
 #ifndef NOFORK
        if(!nofork) daemon(0,0);
+#endif
        do {
        do {
+#ifndef NOFORK
                if (fork()) {
                        /* Due to a race, the kernel NBD driver cannot
                         * call for a reread of the partition table
                if (fork()) {
                        /* Due to a race, the kernel NBD driver cannot
                         * call for a reread of the partition table