weston-launch: Use SOCK_SEQPACKET for the launcher socket
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 18 Sep 2013 18:01:48 +0000 (11:01 -0700)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 18 Sep 2013 18:14:14 +0000 (11:14 -0700)
This lets us detect hang-up when weston-launch dies and clean up properly.

src/weston-launch.c

index fa9104d..80c06a8 100644 (file)
@@ -192,7 +192,7 @@ setup_pam(struct weston_launch *wl)
 static int
 setup_launcher_socket(struct weston_launch *wl)
 {
-       if (socketpair(AF_LOCAL, SOCK_DGRAM, 0, wl->sock) < 0)
+       if (socketpair(AF_LOCAL, SOCK_SEQPACKET, 0, wl->sock) < 0)
                error(1, errno, "socketpair failed");
        
        if (fcntl(wl->sock[0], F_SETFD, FD_CLOEXEC) < 0)