pidfile: stop making pidfile error a special case
commitfee78fd6d2f8dfdfd447a33c34323dd5bd3193a2
authorMichael Tokarev <mjt@tls.msk.ru>
Thu, 30 Oct 2014 14:40:48 +0000 (30 17:40 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 2 Nov 2014 07:04:34 +0000 (2 10:04 +0300)
tree612837d9d5e1c36af4a6fbbe3a007c4ca17ff50b
parentccea25f1c7cd3f0b12d878a5294620f5478729f8
pidfile: stop making pidfile error a special case

In case of -daemonize, we write non-zero to the daemon
pipe only if pidfile creation failed, so the parent will
report error about pidfile problem.  There's no need to
make special case for this, since all other errors are
reported by the child just fine.  Let the parent report
error and simplify logic in os_daemonize().

This way, we don't need os_pidfile_error() function, since
it only prints error now, so put the error reporting printf
into the only place where qemu_create_pidfile() is called,
in vl.c.

While at it, fix wrong indentation in os_daemonize().

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
include/qemu-common.h
os-posix.c
os-win32.c
vl.c