weston-launch: Pass the right CLOEXEC flag to fcntl

Passing O_CLOEXEC to fcntl is wrong, we need to pass FD_CLOEXEC.
dev
Kristian Høgsberg 11 years ago
parent 1ff5109b5f
commit f45b1e8284
  1. 3
      src/weston-launch.c

@ -195,7 +195,8 @@ setup_launcher_socket(struct weston_launch *wl)
if (socketpair(AF_LOCAL, SOCK_DGRAM, 0, wl->sock) < 0) if (socketpair(AF_LOCAL, SOCK_DGRAM, 0, wl->sock) < 0)
error(1, errno, "socketpair failed"); error(1, errno, "socketpair failed");
fcntl(wl->sock[0], F_SETFD, O_CLOEXEC); if (fcntl(wl->sock[0], F_SETFD, FD_CLOEXEC) < 0)
error(1, errno, "fcntl failed");
return 0; return 0;
} }

Loading…
Cancel
Save