Code Review
/
src
/
agl-compositor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
meson: Bump to version 0.0.21
[src/agl-compositor.git]
/
shared
/
os-compatibility.c
diff --git
a/shared/os-compatibility.c
b/shared/os-compatibility.c
index
4bf7d81
..
681a544
100644
(file)
--- a/
shared/os-compatibility.c
+++ b/
shared/os-compatibility.c
@@
-403,3
+403,18
@@
os_ro_anonymous_file_put_fd(int fd)
return 0;
}
+
+int
+os_fd_clear_cloexec(int fd)
+{
+ int flags;
+
+ flags = fcntl(fd, F_GETFD);
+ if (flags == -1)
+ return -1;
+
+ if (fcntl(fd, F_SETFD, flags & ~(int)FD_CLOEXEC) == -1)
+ return -1;
+
+ return 0;
+}