diff options
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index b1324c563..0a73af82f 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -142,12 +142,13 @@ class fhandler_base read or write access */ unsigned close_on_exec : 1; /* close-on-exec */ unsigned need_fork_fixup : 1; /* Set if need to fixup after fork. */ + unsigned isclosed : 1; /* Set when fhandler is closed. */ public: status_flags () : rbinary (0), rbinset (0), wbinary (0), wbinset (0), nohandle (0), did_lseek (0), query_open (no_query), close_on_exec (0), - need_fork_fixup (0) + need_fork_fixup (0), isclosed (0) {} } status, open_status; @@ -158,6 +159,7 @@ class fhandler_base HANDLE io_handle; __ino64_t ino; /* file ID or hashed filename, depends on FS. */ + long _refcnt; protected: /* File open flags from open () and fcntl () calls */ @@ -176,6 +178,7 @@ class fhandler_base HANDLE read_state; public: + long refcnt(long i = 0) {return _refcnt += i;} class fhandler_base *archetype; int usecount; @@ -239,6 +242,7 @@ class fhandler_base IMPLEMENT_STATUS_FLAG (query_state, query_open) IMPLEMENT_STATUS_FLAG (bool, close_on_exec) IMPLEMENT_STATUS_FLAG (bool, need_fork_fixup) + IMPLEMENT_STATUS_FLAG (bool, isclosed) int get_default_fmode (int flags); |