xwayland: remove remaining SOCK_CLOEXEC

This commit is contained in:
emersion 2019-02-20 11:21:42 +01:00
parent 50011e7170
commit cfe7e28416
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 28 additions and 27 deletions

View file

@ -32,24 +32,6 @@ static void safe_close(int fd) {
}
}
static bool set_cloexec(int fd, bool cloexec) {
int flags = fcntl(fd, F_GETFD);
if (flags == -1) {
wlr_log_errno(WLR_ERROR, "fcntl failed");
return false;
}
if (cloexec) {
flags = flags | FD_CLOEXEC;
} else {
flags = flags & ~FD_CLOEXEC;
}
if (fcntl(fd, F_SETFD, flags) == -1) {
wlr_log_errno(WLR_ERROR, "fcntl failed");
return false;
}
return true;
}
static int fill_arg(char ***argv, const char *fmt, ...) {
int len;
char **cur_arg = *argv;