summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Zahorodnii <vlad.zahorodnii@kde.org>2024-05-16 12:39:17 +0300
committerVlad Zahorodnii <vlad.zahorodnii@kde.org>2024-05-16 12:57:42 +0300
commit17965d99e85410f20896c8d353082bd88ba87569 (patch)
tree05bd6f457d57340035d8a93f574434966a589817
parentbuild: bump to version 1.22.92 for the beta release (diff)
downloadwayland-17965d99e85410f20896c8d353082bd88ba87569.tar
wayland-17965d99e85410f20896c8d353082bd88ba87569.tar.gz
wayland-17965d99e85410f20896c8d353082bd88ba87569.tar.bz2
wayland-17965d99e85410f20896c8d353082bd88ba87569.tar.lz
wayland-17965d99e85410f20896c8d353082bd88ba87569.tar.xz
wayland-17965d99e85410f20896c8d353082bd88ba87569.tar.zst
wayland-17965d99e85410f20896c8d353082bd88ba87569.zip
server: Clarify fd ownership in wl_client_create()
It's unclear whether one needs to call close() if wl_client_create() fails. Hopefully this change makes it more clear. Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
-rw-r--r--src/wayland-server.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wayland-server.c b/src/wayland-server.c
index 2df2e6a..0b5b13b 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -520,6 +520,11 @@ bind_display(struct wl_client *client, struct wl_display *display);
*
* On failure this function sets errno accordingly and returns NULL.
*
+ * On success, the new client object takes the ownership of the file
+ * descriptor. On failure, the ownership of the socket endpoint file
+ * descriptor is unchanged, it is the responsibility of the caller to
+ * perform cleanup, e.g. call close().
+ *
* \memberof wl_display
*/
WL_EXPORT struct wl_client *