09:44 wlb: wayland Merge request !395 opened by Vlad Zahorodnii (zzag) server: Clarify fd ownership in wl_client_create() https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/395
09:55 emersion: any chance to get this reviewed? https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/321
10:12 zzag: we can't change this anymore, but why do wl_client_create and wl_display_add_socket_fd have such an api? I personally would expect the both to take the ownership of the file descriptors in either case, whether they succeed or whether they fail
10:15 emersion: i woul;dn't expect that personally
10:15 emersion: maybe the user wants to do something with the FD on error
10:15 emersion: in general that's how APIs behave: on error, leave args untouched
10:15 jadahl: I would assume it didn't take ownership on failure, too
10:22 zzag: well in rust concepts, you'd likely move the file descriptor to the factory function
10:22 zzag: of course, it's not rust
10:23 zzag: but the concept is pretty neat and makes the api less error prone
10:23 zzag: oh well...
18:19 llyyr: could someone take a look at https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/389 ?
20:52 KarenTheDorf: Why would wl_closure_send fail with EAGAIN? It causes wl_display_get_error to return non-zero, so it's fatal to my application, but EAGAIN feels like something that should either be handled inside wayland client, or bubbled up to the application in a non-fatal manner?
20:54 KarenTheDorf: This is *very* intermittent so I don't know exactly what operation is causing this.
20:56 Arnavion: Sending lots of messages such that the socket becomes temporarily unready for write, presumably
20:59 KarenTheDorf: I'm looking at the source and it eventually goes down to wl_connection_queue, which calls wl_connection_flush, and *correctly handles EAGAIN* there, so this just gets weirder.
20:59 KarenTheDorf: I mean, not that my version of wayland-client is actually built from the current main branch so...
21:01 KarenTheDorf: Okay, looks like the fix was in a commit only a month ago, shucks.