summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler.h
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-09-24 21:50:44 +0000
committerChristopher Faylor <me@cgf.cx>2001-09-24 21:50:44 +0000
commit35f879a6d0b6c24045570cf882d1474e1ab0de00 (patch)
tree958334eb496e1b3d8f1311d572d78092717787b7 /winsup/cygwin/fhandler.h
parent4367ec036fabc17ed167b798449537d2a05dda71 (diff)
downloadcygnal-35f879a6d0b6c24045570cf882d1474e1ab0de00.tar.gz
cygnal-35f879a6d0b6c24045570cf882d1474e1ab0de00.tar.bz2
cygnal-35f879a6d0b6c24045570cf882d1474e1ab0de00.zip
* fhandler.h (fhandler_pipe::hit_eof): New method.
(writepipe_exists): New class element. (orig_pid): Ditto. (id): Ditto. (is_slow): Eliminate. * pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance on writepipe_exists, if it exists. (fhandler_pipe::hit_eof): New method, modelled after tty. (fhandler_pipe::dup): Duplicate writepipe_exists, if it exists. (make_pipe): Set up a dummy event for pipes on windows 9x. The nonexistence of this event means that the write side of the pipe has closed. (_dup): Move to syscalls.cc (_dup2): Ditto. * dtable.cc (dtable::build_fhandler): Fill out set_names here, if appropriate. * syscalls.cc (_open): Call set_names in build_fhandler.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r--winsup/cygwin/fhandler.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 1fe6990d0..ed9ca350b 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -368,7 +368,7 @@ public:
virtual HANDLE& get_handle () { return io_handle; }
virtual HANDLE& get_io_handle () { return io_handle; }
virtual HANDLE& get_output_handle () { return io_handle; }
- virtual BOOL hit_eof () {return FALSE;}
+ virtual bool hit_eof () {return FALSE;}
virtual select_record *select_read (select_record *s);
virtual select_record *select_write (select_record *s);
virtual select_record *select_except (select_record *s);
@@ -437,10 +437,12 @@ public:
class fhandler_pipe: public fhandler_base
{
HANDLE guard;
+ HANDLE writepipe_exists;
+ DWORD orig_pid;
+ unsigned id;
public:
fhandler_pipe (const char *name = 0, DWORD devtype = FH_PIPE);
off_t lseek (off_t offset, int whence);
- 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);
@@ -450,6 +452,8 @@ public:
int close ();
void create_guard (SECURITY_ATTRIBUTES *sa) {guard = CreateMutex (sa, FALSE, NULL);}
int dup (fhandler_base *child);
+ bool hit_eof ();
+ friend int make_pipe (int fildes[2], unsigned int psize, int mode);
};
class fhandler_dev_raw: public fhandler_base
@@ -863,7 +867,7 @@ public:
char *ptsname ();
void set_close_on_exec (int val);
- BOOL hit_eof ();
+ bool hit_eof ();
};
class fhandler_tty_master: public fhandler_pty_master