qemu-pr-helper: Daemonize before dropping privileges
commit8dc0bf2647919f9f3e06380d8c748ef5b33b545d
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 3 Apr 2018 13:12:14 +0000 (3 15:12 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 9 Apr 2018 14:36:40 +0000 (9 16:36 +0200)
treec0c399ce96860195cd5e35fefe47e732510cd82d
parent9f91022f28dc092e3b3250823814e4b3191c51ed
qemu-pr-helper: Daemonize before dropping privileges

After we've dropped privileges it might be not possible to write
pidfile. For instance, if this binary is run as root (because
user wants it to write pidfile to some privileged location)
writing pidfile fails because privileges are dropped before we
even get to that.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi/qemu-pr-helper.c