projects
/
profile
/
ivi
/
weston-ivi-shell.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ff5109
)
weston-launch: Pass the right CLOEXEC flag to fcntl
author
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 18 Sep 2013 18:00:56 +0000
(11:00 -0700)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 18 Sep 2013 18:14:14 +0000
(11:14 -0700)
Passing O_CLOEXEC to fcntl is wrong, we need to pass FD_CLOEXEC.
src/weston-launch.c
patch
|
blob
|
history
diff --git
a/src/weston-launch.c
b/src/weston-launch.c
index
be77a34
..
fa9104d
100644
(file)
--- a/
src/weston-launch.c
+++ b/
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)
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;
}