summaryrefslogtreecommitdiff
path: root/src/file.h
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2020-12-08 21:26:00 +0000
committerChristos Zoulas <christos@zoulas.com>2020-12-08 21:26:00 +0000
commit81f15c2b0d6e9eaf524ff7bab37426c21af75fb7 (patch)
treea6f33e0d36d8440ee79ce5576985948f8fb9b217 /src/file.h
parent3dc9066f0b59513951626d8596ea67e23a0fd42e (diff)
downloadfile-git-81f15c2b0d6e9eaf524ff7bab37426c21af75fb7.tar.gz
Fix close_on_exec multithreaded decompression issue.
Diffstat (limited to 'src/file.h')
-rw-r--r--src/file.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/file.h b/src/file.h
index f00e8010..6c390047 100644
--- a/src/file.h
+++ b/src/file.h
@@ -27,7 +27,7 @@
*/
/*
* file.h - definitions for file(1) program
- * @(#)$File: file.h,v 1.222 2020/09/05 14:15:42 christos Exp $
+ * @(#)$File: file.h,v 1.223 2020/12/08 21:26:00 christos Exp $
*/
#ifndef __file_h__
@@ -143,6 +143,14 @@
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+
+#ifndef FD_CLOEXEC
+# define FD_CLOEXEC 1
+#endif
+
#define FILE_BADSIZE CAST(size_t, ~0ul)
#define MAXDESC 64 /* max len of text description/MIME type */
#define MAXMIME 80 /* max len of text MIME type */
@@ -540,6 +548,8 @@ protected char * file_printable(char *, size_t, const char *, size_t);
protected int file_os2_apptype(struct magic_set *, const char *, const void *,
size_t);
#endif /* __EMX__ */
+protected int file_pipe_closexec(int *);
+protected int file_clear_closexec(int);
protected void buffer_init(struct buffer *, int, const struct stat *,
const void *, size_t);