Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <009401c13ac9$f4e3eca0$cd823bd5@dmitry> From: "Dmitry Timoshkov" To: Subject: cygwin_attach_handle_to_fd() bug+fix Date: Tue, 11 Sep 2001 22:57:26 +0900 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0085_01C13B15.208D2EC0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 ------=_NextPart_000_0085_01C13B15.208D2EC0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Hello. Currently cygwin_attach_handle_to_fd() does wrong job for pipes, serials and disk files. Attached patch does fix that problem. -- Dmitry. ------=_NextPart_000_0085_01C13B15.208D2EC0 Content-Type: application/octet-stream; name="dtable.cc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dtable.cc.diff" --- cygwin/cygwin-1.3.2-1/winsup/cygwin/dtable.cc Sat May 19 00:26:42 2001 +++ cygwin/cygwin-1.3.2-1/winsup/cygwin/dtable.cc Tue Sep 11 13:48:28 2001 @@ -232,7 +232,7 @@ dtable::build_fhandler (int fd, const ch devn = FH_CONIN; else if (GetConsoleScreenBufferInfo (handle, &cinfo)) devn= FH_CONOUT; - else if (wsock_started && getpeername ((SOCKET) handle, &sa, &sal)) + else if (wsock_started && !getpeername ((SOCKET) handle, &sa, &sal)) devn = FH_SOCKET; else if (GetFileType (handle) == FILE_TYPE_PIPE) devn = FH_PIPE; ------=_NextPart_000_0085_01C13B15.208D2EC0 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ------=_NextPart_000_0085_01C13B15.208D2EC0--