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:
authorCorinna Vinschen <corinna@vinschen.de>2011-08-18 13:16:50 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-08-18 13:16:50 +0400
commit8f19b4b64f4fbdf19209739a35d6e08138be3cef (patch)
tree99b3f8ccf3bfc4f906090718f9dcb7a7ec643fbb
parent927761a42542d44a5016eb31e8b338cd64b169ce (diff)
* dtable.cc (dtable::get_debugger_info): Add missing braces.
(dtable::stdio_init): Fix incorrect negation of not_open(2) condition.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/dtable.cc16
2 files changed, 14 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e2c178abd..e1c5558f5 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * dtable.cc (dtable::get_debugger_info): Add missing braces.
+ (dtable::stdio_init): Fix incorrect negation of not_open(2) condition.
+
2011-08-16 Pierre Humblet <Pierre.Humblet@ieee.org>
* net.cc (gethostby_helper): Remove DEBUGGING code from and
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index ec110ecdc..d5ae00120 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -130,12 +130,14 @@ dtable::get_debugger_info ()
| O_BINARY, 0777))
release (i);
else
- CloseHandle (h);
- /* Copy to Windows' idea of a standard handle, otherwise
- we have invalid standard handles when calling Windows
- functions (small_printf and strace might suffer, too). */
- SetStdHandle (std_consts[i], i ? fh->get_output_handle ()
- : fh->get_handle ());
+ {
+ CloseHandle (h);
+ /* Copy to Windows' idea of a standard handle, otherwise
+ we have invalid standard handles when calling Windows
+ functions (small_printf and strace might suffer, too). */
+ SetStdHandle (std_consts[i], i ? fh->get_output_handle ()
+ : fh->get_handle ());
+ }
}
}
}
@@ -172,7 +174,7 @@ dtable::stdio_init ()
initialized in dtable::get_debugger_info (). In this case
init_std_file_from_handle is a no-op, so, even if out == err we don't
want to duplicate the handle since it will be unused. */
- if (out == err && (!being_debugged () || !not_open (2)))
+ if (out == err && (!being_debugged () || not_open (2)))
{
/* Since this code is not invoked for forked tasks, we don't have
to worry about the close-on-exec flag here. */