diff options
author | Christopher Faylor <me@cgf.cx> | 2005-02-11 15:24:15 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-02-11 15:24:15 +0000 |
commit | cc9440b6f42536f9f3b3fca6a6c53155792a51eb (patch) | |
tree | 7839100d471d0478d72881287053dde865e70bb4 /winsup/cygwin/fhandler.cc | |
parent | 199bf79367fd838d12900e70c05756f2bc29db5d (diff) | |
download | cygnal-cc9440b6f42536f9f3b3fca6a6c53155792a51eb.tar.gz cygnal-cc9440b6f42536f9f3b3fca6a6c53155792a51eb.tar.bz2 cygnal-cc9440b6f42536f9f3b3fca6a6c53155792a51eb.zip |
* cygthread.cc (cygthread::release): Reset ev here if it exists.
(cygthread::terminate_thread): Eliminat racy code which reset ev and
thread_sync. Remove a few nonsensical inuse checks. Exit at the bottom.
(cygthread::detach): Rewrite to again try to ensure that we don't say we're
signalled when we are not signalled.
* fhandler.cc (fhandler_base::raw_read): Revert to signalling read success
quickly.
* pipe.cc (fhandler_pipe::close): Use base method to close handle.
* sigproc.h (WAIT_SIG_PRIORITY): Just trundle along at normal priority to allow
the pipe thread to do its thing if possible.
* pinfo.h (pinfo::zap_cwd): Declare new function.
(pinfo::zap_cwd): Move 'cd out of the way code' here.
(pinfo::exit): Use it here.
* spawn.cc (spawn_guts): And here.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 1a18b7550..ab588b500 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -234,6 +234,11 @@ fhandler_base::raw_read (void *ptr, size_t& ulen) signal_read_state (1); } BOOL res = ReadFile (get_handle (), ptr, len, (DWORD *) &ulen, 0); + if (read_state) + { + signal_read_state (1); + (void) SetThreadPriority (h, prio); + } if (!res) { /* Some errors are not really errors. Detect such cases here. */ @@ -270,11 +275,6 @@ fhandler_base::raw_read (void *ptr, size_t& ulen) break; } } - if (read_state) - { - signal_read_state (1); - (void) SetThreadPriority (h, prio); - } #undef bytes_read } |