From: "Vivek.A" <[email protected]>

    Without this, client socket file descriptors are being kept open until the 
process
    hosting the compositor gets terminated / exit. This causes compositor 
termination
    goes undetected through its fd. This could be reproduced by having 
compositor as
    one of the threads in a process.

    https://bugs.freedesktop.org/show_bug.cgi?id=99142

    Signed-off-by: Vivek.A <[email protected]>
---
 src/wayland-server.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/wayland-server.c b/src/wayland-server.c
index 9d7d9c1..8195064 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -979,11 +979,16 @@ wl_socket_alloc(void)
 WL_EXPORT void
 wl_display_destroy(struct wl_display *display)
 {
+       struct wl_client *c, *cnext;
        struct wl_socket *s, *next;
        struct wl_global *global, *gnext;
 
        wl_signal_emit(&display->destroy_signal, display);
 
+       wl_list_for_each_safe(c, cnext, &display->client_list, link) {
+               wl_client_destroy(c);
+       }
+
        wl_list_for_each_safe(s, next, &display->socket_list, link) {
                wl_socket_destroy(s);
        }
-- 
1.9.1

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to