- We fork off a child process
- The child process is daemonized (closing its stdin and stdout)
- stderr of the child is routed through the parent, so the parent can
see errors and adjust its exit code accordingly
- Once the child closes its end of this stderr pipe (done right after
creating the PID file), the parent exits
It is not named --fork, because --fork was probably a name that few
programs but qemu-nbd ever used. qemu (the system emulator) itself uses
-daemonize, too. (Besides, QSD's interface is not compatible to
qemu-nbd anyway; compare --pidfile vs. --pid-file.)
Signed-off-by: Hanna Reitz<hreitz@redhat.com>