summaryrefslogtreecommitdiff
path: root/qemu-lock.h
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2012-01-16 18:37:44 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2012-02-17 12:41:48 +0100
commit9faf31b68f049ca6432a1ef086a76344ff2a2357 (patch)
tree1998d8c9943f6a50063833062ac8c4062a40e287 /qemu-lock.h
parent9de36b1a7cf61aa8be365f13c81668b3e19fbc7f (diff)
downloadqemu-9faf31b68f049ca6432a1ef086a76344ff2a2357.tar.gz
do not chdir(/) in qemu-nbd before opening all files
When qemu-nbd becomes a daemon it calls daemon(3) with nochdir=0, so daemon(3) changes current directory to /. But at this time, qemu-nbd did not open any user-specified files yet, so by changing current directory, all non-absolute paths becomes wrong. The solution is to pass nochdir=1 to daemon(3) function, and to chdir("/") after all init has been performed, before entering the main loop, -- just like a good daemon should do. This patch is applicable for -stable. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-lock.h')
0 files changed, 0 insertions, 0 deletions