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 /winsup/cygwin/tty.cc
parent7c14eb05898d6095d8f694bf41c4f0914d9d96b1 (diff)
* tty.cc (grantpt): Check for valid fd.
(unlockpt): Ditto.
Diffstat (limited to 'winsup/cygwin/tty.cc')
-rw-r--r--winsup/cygwin/tty.cc6
1 files changed, 4 insertions, 2 deletions
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