Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/dtable.h')
-rw-r--r--winsup/cygwin/dtable.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/winsup/cygwin/dtable.h b/winsup/cygwin/dtable.h
index c1344549e..7b5af6fb8 100644
--- a/winsup/cygwin/dtable.h
+++ b/winsup/cygwin/dtable.h
@@ -31,14 +31,22 @@ class dtable
unsigned farchetype;
static const int initial_archetype_size = 8;
int first_fd_for_open;
+ int cnt_need_fixup_before;
void lock () {lock_process::locker.acquire ();}
void unlock () {lock_process::locker.release ();}
public:
size_t size;
- dtable () : archetypes (NULL), narchetypes (0), farchetype (0), first_fd_for_open(3) {}
+ dtable () : archetypes (NULL), narchetypes (0), farchetype (0), first_fd_for_open(3), cnt_need_fixup_before(0) {}
void init () {first_fd_for_open = 3;}
+ void dec_need_fixup_before ()
+ { if (cnt_need_fixup_before > 0) --cnt_need_fixup_before; }
+ void inc_need_fixup_before ()
+ { cnt_need_fixup_before++; }
+ bool need_fixup_before ()
+ { return cnt_need_fixup_before > 0; }
+
void move_fd (int, int);
int vfork_child_dup ();
void vfork_parent_restore ();
@@ -73,6 +81,8 @@ public:
fhandler_base *find_archetype (device& dev);
fhandler_base **add_archetype ();
void delete_archetype (fhandler_base *);
+ void fixup_before_exec (DWORD win_proc_id);
+ void fixup_before_fork (DWORD win_proc_id);
friend void dtable_init ();
friend void __stdcall close_all_files (bool);
friend class fhandler_disk_file;