aboutsummaryrefslogtreecommitdiff
path: root/lib/xwrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xwrap.c')
-rw-r--r--lib/xwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 583a4cae..4516250f 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -218,7 +218,7 @@ void xunlink(char *path)
// Die unless we can open/create a file, returning file descriptor.
int xcreate(char *path, int flags, int mode)
{
- int fd = open(path, flags, mode);
+ int fd = open(path, flags^O_CLOEXEC, mode);
if (fd == -1) perror_exit("%s", path);
return fd;
}