From owner-freebsd-current Tue Feb 27 18:20:52 2001 Delivered-To: freebsd-current@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id C9D0737B71C for ; Tue, 27 Feb 2001 18:20:46 -0800 (PST) (envelope-from jlemon@flugsvamp.com) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f1S2JTl80974; Tue, 27 Feb 2001 20:19:29 -0600 (CST) (envelope-from jlemon) Date: Tue, 27 Feb 2001 20:19:29 -0600 (CST) From: Jonathan Lemon Message-Id: <200102280219.f1S2JTl80974@prism.flugsvamp.com> To: tmoestl@gmx.net, current@freebsd.org Subject: Re: [PATCH] for linux_connect (ugly) X-Newsgroups: local.mail.freebsd-current In-Reply-To: References: Organization: Cc: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article you write: >Some background: when a socket is connected in non-blocking mode and >the connect does not immediately succeed (i.e. EINPROGRESS is returned), >linux obviously will return the value getsockopt(...SO_ERROR...) on the >socket would give on FreeBSD (i.e. 0 if the connection attempt succeeded) >from the first connect() call on the socket after the connection has been >established. Only the next call will returne EISCONN. >So, the linuxulator has been modified in the past to always return the >value getsockopt(...SO_ERROR...) gives. >This does break applications that loop and wait for EISCONN, e.g. >StarOffice. Let me get this straight, just so I understand the behavior: 1. socket is marked non-blocking. 2. connect() is made, does not immediately succeed, returns EINPROGRESS 3. connect() call is repeatedly made, EALREADY is returned. 4. connection finally established, connect() returns EISCONN Is this the correct/desired behavior? -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message