unix: wait for listen() as well as bind()
We need to wait for listen() as well as bind() for internal unix sockets, or we can race like this: (00.135950) 1: Opening standalone socket (id 0xb ino 0x9422f peer 0) (00.135974) 353: Error (sk-unix.c:701): Can't connect 0x947c4 socket: Connection refused (00.136390) 1: Error (cr-restore.c:1228): 353 exited, status=1 (00.136407) 1: Putting 0x9422f into listen state (where 0x9422f is the peer for 0x947c4) This race was pretty rare for me, but I've run 1000 tests and it didn't happen so hopefully this patch fixes it :) Signed-off-by:Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
Showing
Please
register
or
sign in
to comment