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