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 Date: Tue, 13 Feb 2001 21:34:21 +1300 From: Dan Plimak To: Cygwin-L Subject: Re: DuplicateHandle() failing under MS Telnet Server Message-ID: <20010213213421.A540@systematik.co.nz> Mail-Followup-To: Dan Plimak , Cygwin-L References: <20010212174335 DOT A5323 AT systematik DOT co DOT nz> <3A87DABB DOT F72D55C0 AT etr-usa DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3A87DABB.F72D55C0@etr-usa.com>; from warren@etr-usa.com on Mon, Feb 12, 2001 at 05:44:43AM -0700 On Mon, Feb 12, 2001 at 05:44:43AM -0700, Warren Young wrote: > This is a "feature" of Microsoft stacks. You can use DuplicateHandle() > with Winsock 1.1 to do odd things that normally require the new > WSADuplicateSocket() and other new Winsock 2/Win32 functionality. For a > fuller explanation, there's an article in my FAQ about this, called > "Passing Sockets Between Processes". > > This feature could be used to implement dup() or maybe dup2() on Winsock > 1.1 systems, but that's basically only Windows 95, so it's of fairly > little value these days. (Win98+ and NT 4+ have Winsock 2 installed by > default.) Incidentally, it has always pained me to remember that a socket != HANDLE in Winsock. This underscores the fact that MS's Berkeley sockets implementation is only a half-assed emulation layer on top of Winsock's WSAxxx function family, and convenient stuff people are used to doing under UNIX like doing write()s and read()s on sockets don't work. *sigh* > = Warren Young, maintainer of the Winsock Programmer's FAQ at: -- danp -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple