* tty.cc (grantpt): Check for valid fd.
(unlockpt): Ditto.
This commit is contained in:
		| @@ -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> | 2011-09-02  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
| 	* net.cc (cygwin_getsockopt): Drop erroneous double conversion of error | 	* net.cc (cygwin_getsockopt): Drop erroneous double conversion of error | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ details. */ | |||||||
|  |  | ||||||
| #undef CloseHandle | #undef CloseHandle | ||||||
|  |  | ||||||
| static cygthread NO_COPY threads[32]; | static cygthread NO_COPY threads[64]; | ||||||
| #define NTHREADS (sizeof (threads) / sizeof (threads[0])) | #define NTHREADS (sizeof (threads) / sizeof (threads[0])) | ||||||
|  |  | ||||||
| DWORD NO_COPY cygthread::main_thread_id; | DWORD NO_COPY cygthread::main_thread_id; | ||||||
|   | |||||||
| @@ -34,13 +34,15 @@ posix_openpt (int oflags) | |||||||
| extern "C" int | extern "C" int | ||||||
| grantpt (int fd) | grantpt (int fd) | ||||||
| { | { | ||||||
|   return 0; |   cygheap_fdget cfd (fd); | ||||||
|  |   return cfd < 0 ? -1 : 0; | ||||||
| } | } | ||||||
|  |  | ||||||
| extern "C" int | extern "C" int | ||||||
| unlockpt (int fd) | unlockpt (int fd) | ||||||
| { | { | ||||||
|   return 0; |   cygheap_fdget cfd (fd); | ||||||
|  |   return cfd < 0 ? -1 : 0; | ||||||
| } | } | ||||||
|  |  | ||||||
| extern "C" int | extern "C" int | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user