• Michael Tokarev's avatar
    pidfile: stop making pidfile error a special case · fee78fd6
    Michael Tokarev authored
    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: default avatarMichael Tokarev <mjt@tls.msk.ru>
qemu-common.h 14.1 KB