* 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

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