diff options
author | Christopher Faylor <me@cgf.cx> | 2001-09-22 20:55:02 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-09-22 20:55:02 +0400 |
commit | 5e733918c085833e32581ac0bb0437b00ad2aa8e (patch) | |
tree | 1a6e4725f8c88ede60c41c445c98d685224cd85a /winsup/cygwin/fhandler.h | |
parent | 142920f65aeeefc29ef903b75b6327668341bc8e (diff) |
* exceptions.cc (setup_handler): Always relinquish lock after we've
interrupted.
* fhandler.cc: Move pipe methods to pipe.cc.
* fhandler.h (fhandler_pipe): Add new methods.
* fork.cc (sync_with_parent): Make error messages more informative.
* pipe.cc (fhandler_pipe::fhandler_pipe): Move here from fhandler.cc.
(fhandler_pipe::lseek): Ditto.
(fhandler_pipe::set_close_on_exec): New method.
(fhandler_pipe::read): Ditto.
(fhandler_pipe::close): Ditto.
(fhandler_pipe::dup): Ditto.
(make_pipe): Create the guard mutex on the read side of the pipe.
* select.cc (peek_pipe): Use guard_mutex to discover if we have the right to
read on this pipe.
(fhandler_pipe::readh_for_read): Pass the read pipe guard mutex to peek_pipe.
* syscalls.cc (_read): Always detect signal catchers, for now.
* debug.cc (makethread): Eliminate hack to make thread inheritable.
* sigproc.cc (subproc_init): Don't use hack to make thread inheritable.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 94c623f8b..79d039e64 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -435,17 +435,20 @@ public: class fhandler_pipe: public fhandler_base { + HANDLE guard; public: fhandler_pipe (const char *name = 0, DWORD devtype = FH_PIPE); off_t lseek (off_t offset, int whence); - /* This strange test is due to the fact that we can't rely on - Windows shells to "do the right thing" with pipes. Apparently - the can keep one end of the pipe open when it shouldn't be. */ BOOL is_slow () {return !wincap.has_unreliable_pipes ();} select_record *select_read (select_record *s); select_record *select_write (select_record *s); select_record *select_except (select_record *s); int ready_for_read (int fd, DWORD howlong, int ignra); + void set_close_on_exec (int val); + int read (void *ptr, size_t len); + int close (); + void create_guard (SECURITY_ATTRIBUTES *sa) {guard = CreateMutex (sa, FALSE, NULL);} + int dup (fhandler_base *child); }; class fhandler_dev_raw: public fhandler_base |