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>2011-09-21 08:33:57 +0400
committerChristopher Faylor <me@cgf.cx>2011-09-21 08:33:57 +0400
commit36b6320736dfd69ad4c07ea4ee0e0e5f10a3319d (patch)
tree10829b23895725aa65f43600171143222421c65e
parent7c14eb05898d6095d8f694bf41c4f0914d9d96b1 (diff)
* tty.cc (grantpt): Check for valid fd.
(unlockpt): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/cygthread.cc2
-rw-r--r--winsup/cygwin/tty.cc6
3 files changed, 10 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 6aaaa7cb4..96aaaeefe 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-21 Christopher Faylor <me.cygwin2011@cgf.cx>
+
+ * tty.cc (grantpt): Check for valid fd.
+ (unlockpt): Ditto.
+
2011-09-02 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_getsockopt): Drop erroneous double conversion of error
diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc
index a98f372a1..f57cdcec8 100644
--- a/winsup/cygwin/cygthread.cc
+++ b/winsup/cygwin/cygthread.cc
@@ -16,7 +16,7 @@ details. */
#undef CloseHandle
-static cygthread NO_COPY threads[32];
+static cygthread NO_COPY threads[64];
#define NTHREADS (sizeof (threads) / sizeof (threads[0]))
DWORD NO_COPY cygthread::main_thread_id;
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc
index 377eb557f..e751d30c2 100644
--- a/winsup/cygwin/tty.cc
+++ b/winsup/cygwin/tty.cc
@@ -34,13 +34,15 @@ posix_openpt (int oflags)
extern "C" int
grantpt (int fd)
{
- return 0;
+ cygheap_fdget cfd (fd);
+ return cfd < 0 ? -1 : 0;
}
extern "C" int
unlockpt (int fd)
{
- return 0;
+ cygheap_fdget cfd (fd);
+ return cfd < 0 ? -1 : 0;
}
extern "C" int