]> mj.ucw.cz Git - libucw.git/blobdiff - lib/fastbuf.h
Introduced bfdopen_shared() which behaves like bfdopen(), but on
[libucw.git] / lib / fastbuf.h
index f3a05952c9db60a16021f66da5e1eaf2d9e2badd..7baa5013b77355546c7b8e5a4db1dc59f4cc7f85 100644 (file)
@@ -69,13 +69,14 @@ struct fastbuf {
 struct fb_file {
   struct fastbuf fb;
   int fd;                              /* File descriptor, -1 if not a real file */
-  int is_temp_file;                    /* Is a temporary file, delete on close */
+  int is_temp_file;                    /* 0=normal file, 1=temporary file, delete on close, -1=shared FD */
 };
 #define FB_FILE(f) ((struct fb_file *)(f)->is_fastbuf)
 
 struct fastbuf *bopen(byte *name, uns mode, uns buffer);
 struct fastbuf *bopen_tmp(uns buffer);
 struct fastbuf *bfdopen(int fd, uns buffer);
+struct fastbuf *bfdopen_shared(int fd, uns buffer);
 void bbcopy(struct fastbuf *f, struct fastbuf *t, uns l);
 #define FB_IS_TEMP_FILE(f) FB_FILE(f)->is_temp_file