mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-19 05:34:02 -04:00
os: wrap SOCK_CLOEXEC
Signed-off-by: Weijia Wang <contact@weijia.wang>
This commit is contained in:
parent
60827b862e
commit
fe70c799e5
6 changed files with 44 additions and 10 deletions
|
|
@ -34,6 +34,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "wayland-os.h"
|
||||
#include "wayland-private.h"
|
||||
#include "wayland-server.h"
|
||||
#include "test-runner.h"
|
||||
|
|
@ -59,7 +60,7 @@ TEST(client_destroy_listener)
|
|||
struct client_destroy_listener a, b;
|
||||
int s[2];
|
||||
|
||||
assert(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, s) == 0);
|
||||
assert(wl_os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, s) == 0);
|
||||
display = wl_display_create();
|
||||
assert(display);
|
||||
client = wl_client_create(display, s[0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue