xemu/docs/tools
Hanna Reitz 2525edd85f qsd: Add --daemonize
To implement this, we reuse the existing daemonizing functions from the
system emulator, which mainly do the following:
- Fork off a child process, and set up a pipe between parent and child
- The parent process waits until the child sends a status byte over the
  pipe (0 means that the child was set up successfully; anything else
  (including errors or EOF) means that the child was not set up
  successfully), and then exits with an appropriate exit status
- The child process enters a new session (forking off again), changes
  the umask, and will ignore terminal signals from then on
- Once set-up is complete, the child will chdir to /, redirect all
  standard I/O streams to /dev/null, and tell the parent that set-up has
  been completed successfully

In contrast to qemu-nbd's --fork implementation, during the set up
phase, error messages are not piped through the parent process.
qemu-nbd mainly does this to detect errors, though (while os_daemonize()
has the child explicitly signal success after set up); because we do not
redirect stderr after forking, error messages continue to appear on
whatever the parent's stderr was (until set up is complete).

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220303164814.284974-4-hreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2022-03-04 18:14:40 +01:00
..
index.rst docs: standardize directory index to --- with overline 2021-09-13 13:56:26 +02:00
qemu-img.rst qemu-img: Unify [-b [-F]] documentation 2022-02-01 13:49:15 +01:00
qemu-nbd.rst docs: Render binary names as monospaced text 2021-11-22 15:02:38 +01:00
qemu-pr-helper.rst docs: standardize book titles to === with overline 2021-09-13 13:56:26 +02:00
qemu-storage-daemon.rst qsd: Add --daemonize 2022-03-04 18:14:40 +01:00
qemu-trace-stap.rst docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name 2022-01-05 11:10:13 +01:00
virtfs-proxy-helper.rst docs: Move tools documentation to tools manual 2020-02-25 10:48:06 +00:00
virtiofsd.rst virtiofsd: Add an option to enable/disable security label 2022-02-17 17:22:26 +00:00