Revision 9faf31b6
b/qemu-nbd.c | ||
---|---|---|
429 | 429 |
pid = fork(); |
430 | 430 |
if (pid == 0) { |
431 | 431 |
close(stderr_fd[0]); |
432 |
ret = qemu_daemon(0, 0);
|
|
432 |
ret = qemu_daemon(1, 0);
|
|
433 | 433 |
|
434 | 434 |
/* Temporarily redirect stderr to the parent's pipe... */ |
435 | 435 |
dup2(stderr_fd[1], STDERR_FILENO); |
... | ... | |
527 | 527 |
qemu_set_fd_handler2(fd, nbd_can_accept, nbd_accept, NULL, |
528 | 528 |
(void *)(uintptr_t)fd); |
529 | 529 |
|
530 |
/* now when the initialization is (almost) complete, chdir("/") |
|
531 |
* to free any busy filesystems */ |
|
532 |
if (chdir("/") < 0) { |
|
533 |
err(EXIT_FAILURE, "Could not chdir to root directory"); |
|
534 |
} |
|
535 |
|
|
530 | 536 |
do { |
531 | 537 |
main_loop_wait(false); |
532 | 538 |
} while (!sigterm_reported && (persistent || !nbd_started || nb_fds > 0)); |
Also available in: Unified diff