Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Sent: 17 Apr 2003 03:48:32 GMT Message-ID: <008301c30494$3ac5ac50$0200a8c0@abackusdell2> From: "Abraham Backus" To: References: Subject: Re: ENOTSOCK errors with cygwin dll 1.3.21 and 1.3.22 Date: Wed, 16 Apr 2003 20:48:37 -0700 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0080_01C30459.8E077640" X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 ------=_NextPart_000_0080_01C30459.8E077640 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Thanks Igor. I've downloaded the cygwin cvs and am trying to track down what's up in any spare time that I get. In the meantime though, I've copied some code from a testcase for one of the patches and made some of my own modifications to run it using inetd. With 1.3.20, the code is ok. With 1.3.22 however, the calls to fgets(), fputs(), and fflush() all fail with "Socket operation on non-socket" (errno=ENOTSOCK) ----- Original Message ----- > Look in winsup/cygwin/ChangeLog between "Bump DLL minor number to 22" and > "Bump DLL minor number to 23"... You could also look in the cygwin-cvs > list archives between 3/9 and 3/13. > > FWIW, I see the following socket-related changes: > > > > but I might have missed something... ------=_NextPart_000_0080_01C30459.8E077640 Content-Type: text/plain; name="main.cc" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="main.cc" #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= =0A= void checkIsSocket(int fd)=0A= {=0A= struct stat buf;=0A= memset(&buf, 0, sizeof (buf));=0A= if (fstat(fd, &buf) < 0)=0A= {=0A= syslog(LOG_INFO, "fstat() failed with %d\n", errno);=0A= return;=0A= }=0A= =0A= if (S_ISSOCK(buf.st_mode))=0A= {=0A= syslog(LOG_INFO, "fd %d is a socket\n", fd);=0A= }=0A= else=0A= {=0A= syslog(LOG_INFO, "fd %d is not a socket\n", fd);=0A= }=0A= }=0A= =0A= int main()=0A= {=0A= checkIsSocket(0);=0A= checkIsSocket(1);=0A= checkIsSocket(2);=0A= =0A= char buf[1024];=0A= if (NULL =3D=3D fgets(buf, 1024, stdin))=0A= {=0A= syslog(LOG_INFO, "stdin %s", strerror(errno));=0A= }=0A= if (EOF =3D=3D fputs("yo", stdout))=0A= {=0A= syslog(LOG_INFO, "stdout %s", strerror(errno));=0A= }=0A= else=0A= {=0A= if (EOF =3D=3D fflush(stdout))=0A= {=0A= syslog(LOG_INFO, "stdout flush %s", strerror(errno));=0A= }=0A= }=0A= if (EOF =3D=3D fputs("yo", stderr))=0A= {=0A= syslog(LOG_INFO, "stderr %s", strerror(errno));=0A= }=0A= else=0A= {=0A= if (EOF =3D=3D fflush(stderr))=0A= {=0A= syslog(LOG_INFO, "stderr flush %s", strerror(errno));=0A= }=0A= }=0A= }=0A= ------=_NextPart_000_0080_01C30459.8E077640 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ------=_NextPart_000_0080_01C30459.8E077640--