Skip to content
  • German Maglione's avatar
    Close the listener in the parent process · fd13a99f
    German Maglione authored
    
    
    The namespace sandbox spawn a process that set the namespaces
    and wait for the for worker process to finish.
    
    The worker process drops the `vhost::Listener` after the first
    `accept()`. However, `util::wait_forchild()` never returns, so
    the parent keeps all the FDs open, like the socket's FD in a
    listen state. This is problematic because nothing prevents a
    miss configured VMM to try to connect twice to the same socket
    leaving the VMM waiting forever.
    
    Let's close the socket FD in the parent before waiting for the
    child to finish.
    
    Signed-off-by: default avatarGerman Maglione <gmaglione@redhat.com>
    fd13a99f