Cygwin: FIFO: stop the listen_client thread before fork/exec

Add methods need_fixup_before, init_fixup_before, and
fixup_before_fork_exec to accomplish this.  Stopping the thread makes
sure that the client handler lists of the parent and child remain in
sync while the forking/execing is in progress.
This commit is contained in:
Ken Brown
2019-04-20 11:41:12 -04:00
parent 252cd0ce2b
commit 4443100b53
2 changed files with 16 additions and 2 deletions

View File

@ -1300,6 +1300,9 @@ public:
void __reg3 raw_read (void *ptr, size_t& ulen);
ssize_t __reg3 raw_write (const void *ptr, size_t ulen);
bool arm (HANDLE h);
bool need_fixup_before () const { return reader; }
int fixup_before_fork_exec (DWORD) { return stop_listen_client (); }
void init_fixup_before ();
void fixup_after_fork (HANDLE);
void fixup_after_exec ();
int __reg2 fstatvfs (struct statvfs *buf);