delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/11/09:57:15

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
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" <dmitry AT baikal DOT ru>
To: <cygwin AT cygwin DOT com>
Subject: cygwin_attach_handle_to_fd() bug+fix
Date: Tue, 11 Sep 2001 22:57:26 +0900
MIME-Version: 1.0
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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019