Skip to content
Snippets Groups Projects
  • Hanna Reitz's avatar
    f22ac472
    os-posix: Add os_set_daemonize() · f22ac472
    Hanna Reitz authored
    
    The daemonizing functions in os-posix (os_daemonize() and
    os_setup_post()) only daemonize the process if the static `daemonize`
    variable is set.  Right now, it can only be set by os_parse_cmd_args().
    
    In order to use os_daemonize() and os_setup_post() from the storage
    daemon to have it be daemonized, we need some other way to set this
    `daemonize` variable, because I would rather not tap into the system
    emulator's arg-parsing code.  Therefore, this patch adds an
    os_set_daemonize() function, which will return an error on os-win32
    (because daemonizing is not supported there).
    
    Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
    Message-Id: <20220303164814.284974-2-hreitz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    f22ac472
    History
    os-posix: Add os_set_daemonize()
    Hanna Reitz authored
    
    The daemonizing functions in os-posix (os_daemonize() and
    os_setup_post()) only daemonize the process if the static `daemonize`
    variable is set.  Right now, it can only be set by os_parse_cmd_args().
    
    In order to use os_daemonize() and os_setup_post() from the storage
    daemon to have it be daemonized, we need some other way to set this
    `daemonize` variable, because I would rather not tap into the system
    emulator's arg-parsing code.  Therefore, this patch adds an
    os_set_daemonize() function, which will return an error on os-win32
    (because daemonizing is not supported there).
    
    Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
    Message-Id: <20220303164814.284974-2-hreitz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>