aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_linux.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-11-28 10:26:40 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-11-28 10:30:27 +0100
commit46869e3ee2274fbf353cb2c7d6cf36ed19e52b45 (patch)
tree5851b8634916ba051573abd3007b9623d11ec442 /executor/common_linux.h
parent97264cb1f32b60bfce5a79a8c06d2b1b20875490 (diff)
pkg/csource: detect common mistakes in the common executor header
Diffstat (limited to 'executor/common_linux.h')
-rw-r--r--executor/common_linux.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h
index dabc13812..66d3d561e 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -2637,8 +2637,9 @@ retry:
int fd = open(filename, O_RDONLY);
if (fd != -1) {
long flags = 0;
- if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0)
+ if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) {
debug("reset FS_XFLAG_IMMUTABLE\n");
+ }
close(fd);
continue;
}
@@ -2665,8 +2666,9 @@ retry:
int fd = open(dir, O_RDONLY);
if (fd != -1) {
long flags = 0;
- if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0)
+ if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) {
debug("reset FS_XFLAG_IMMUTABLE\n");
+ }
close(fd);
continue;
}