diff options
author | Christopher Faylor <me@cgf.cx> | 2011-09-21 04:33:57 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-09-21 04:33:57 +0000 |
commit | 36b6320736dfd69ad4c07ea4ee0e0e5f10a3319d (patch) | |
tree | 10829b23895725aa65f43600171143222421c65e /winsup | |
parent | 7c14eb05898d6095d8f694bf41c4f0914d9d96b1 (diff) | |
download | cygnal-36b6320736dfd69ad4c07ea4ee0e0e5f10a3319d.tar.gz cygnal-36b6320736dfd69ad4c07ea4ee0e0e5f10a3319d.tar.bz2 cygnal-36b6320736dfd69ad4c07ea4ee0e0e5f10a3319d.zip |
* tty.cc (grantpt): Check for valid fd.
(unlockpt): Ditto.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/cygthread.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/tty.cc | 6 |
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 |