From 35f879a6d0b6c24045570cf882d1474e1ab0de00 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 24 Sep 2001 21:50:44 +0000 Subject: * 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. --- winsup/cygwin/select.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'winsup/cygwin/select.cc') diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 67365d925..b01d833ef 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -420,11 +420,6 @@ peek_pipe (select_record *s, int ignra, HANDLE guard_mutex = NULL) gotone = 1; goto out; } - if (fh->bg_check (SIGTTIN) <= bg_eof) - { - gotone = s->read_ready = 1; - goto out; - } switch (fh->get_device ()) { @@ -444,6 +439,12 @@ peek_pipe (select_record *s, int ignra, HANDLE guard_mutex = NULL) goto out; } } + + if (fh->bg_check (SIGTTIN) <= bg_eof) + { + gotone = s->read_ready = 1; + goto out; + } } if (fh->get_device () == FH_PIPEW) -- cgit v1.2.3