Revision f5de141b qemu-nbd.c

b/qemu-nbd.c
345 345
        pid_t pid;
346 346
        int sock;
347 347

  
348
        if (!verbose)
349
            daemon(0, 0);	/* detach client and server */
348
        if (!verbose) {
349
            /* detach client and server */
350
            if (daemon(0, 0) == -1) {
351
                errx(errno, "Failed to daemonize");
352
            }
353
        }
350 354

  
351 355
        if (socket == NULL) {
352 356
            sprintf(sockpath, SOCKET_PATH, basename(device));

Also available in: Unified diff