aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/dtable.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2004-07-23 09:04:59 +0000
committerCorinna Vinschen <corinna@vinschen.de>2004-07-23 09:04:59 +0000
commit061095b5a33fefcb3a7a09f732052d97bc2b0ec1 (patch)
tree8b69088874990839c2d3865569629c9abef8c55c /winsup/cygwin/dtable.cc
parent0544d11637ddb0cc1a5a8bcd79e5a4805a446fd4 (diff)
downloadnewlib-061095b5a33fefcb3a7a09f732052d97bc2b0ec1.zip
newlib-061095b5a33fefcb3a7a09f732052d97bc2b0ec1.tar.gz
newlib-061095b5a33fefcb3a7a09f732052d97bc2b0ec1.tar.bz2
* dtable.cc (dtable::get_debugger_info): Make stderr r/w according
to SUSv3.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index c9f0cde..cc72a2a 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -119,7 +119,8 @@ dtable::get_debugger_info ()
if (!fh)
continue;
fds[i] = fh;
- if (!fh->open ((i ? O_WRONLY : O_RDONLY) | O_BINARY, 0777))
+ if (!fh->open ((i ? (i == 2 ? O_RDWR : O_WRONLY) : O_RDONLY)
+ | O_BINARY, 0777))
release (i);
else
CloseHandle (h);