* tty.cc (grantpt): Check for valid fd.

(unlockpt): Ditto.
This commit is contained in:
Christopher Faylor 2011-09-21 04:33:57 +00:00
parent 7c14eb0589
commit 36b6320736
3 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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;

View File

@ -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