Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-09-10 20:43:47 +0400
committerChristopher Faylor <me@cgf.cx>2000-09-10 20:43:47 +0400
commit4f7ac76aae140bb9de50fe4c81e3cf6d23b100e2 (patch)
tree81e313f620968f06dc4d5cc3e42e9919595a52e2 /winsup/cygwin/dtable.cc
parent4497c0df52833fc777f0708567d2e1533ac794dc (diff)
* dcrt0.cc (dll_crt0_1): Initialize thread and debug stuff before handling
exec/fork. * dtable.cc (dtable::fixup_after_exec): Always clear out the read ahead buffer whether closing or adjusting. * path.cc (chdir): Avoid a compiler warning.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 9e7b3c5d5..b2a765a3e 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -445,13 +445,13 @@ dtable::fixup_after_exec (HANDLE parent, size_t sz, fhandler_base **f)
first_fd_for_open = 0;
for (size_t i = 0; i < size; i++)
if (fds[i])
- if (fds[i]->get_close_on_exec ())
- release (i);
- else
- {
- fds[i]->clear_readahead ();
+ {
+ fds[i]->clear_readahead ();
+ if (fds[i]->get_close_on_exec ())
+ release (i);
+ else
fds[i]->fixup_after_exec (parent);
- }
+ }
}
void