server: add wl_display_destroy_clients()

Bug [1] reported that wl_display_destroy() doesn't destroy clients, so
client socket file descriptors are being kept open until the compositor
process exits.

Patch [2] proposed to destroy clients in wl_display_destroy(). The
patch was not accepted because doing so changes the ABI.

Thus, a new wl_display_destroy_clients() function is added in this
patch. It should be called by compositors right before
wl_display_destroy().

[1] https://bugs.freedesktop.org/show_bug.cgi?id=99142
[2] https://patchwork.freedesktop.org/patch/128832/

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Simon Ser 2017-12-13 11:51:19 +01:00 committed by Daniel Stone
parent ef48ff21f0
commit bf7cc68053
2 changed files with 41 additions and 0 deletions

View file

@ -214,6 +214,9 @@ wl_display_run(struct wl_display *display);
void
wl_display_flush_clients(struct wl_display *display);
void
wl_display_destroy_clients(struct wl_display *display);
struct wl_client;
typedef void (*wl_global_bind_func_t)(struct wl_client *client, void *data,