chiark / gitweb /
util: consider both fuse.glusterfs and glusterfs network file systems
[elogind.git] / src / udev / collect / collect.c
index 2bbbcd71060b32b8a7a7142947d908adc5f7e3c5..4ecb6b0d19158cefae5366febcb86e4d9edc8008 100644 (file)
@@ -61,7 +61,7 @@ static inline struct _mate *node_to_mate(struct udev_list_node *node)
         return container_of(node, struct _mate, node);
 }
 
-_noreturn_ static void sig_alrm(int signo)
+noreturn static void sig_alrm(int signo)
 {
         exit(4);
 }
@@ -95,7 +95,7 @@ static int prepare(char *dir, char *filename)
 
         snprintf(buf, sizeof(buf), "%s/%s", dir, filename);
 
-        fd = open(buf,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+        fd = open(buf,O_RDWR|O_CREAT|O_CLOEXEC, S_IRUSR|S_IWUSR);
         if (fd < 0)
                 fprintf(stderr, "Cannot open %s: %m\n", buf);