Mail Archives: cygwin/2003/04/16/23:48:41
------=_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:
> <http://cygwin.com/ml/cygwin-cvs/2003-q1/msg00359.html>
> <http://cygwin.com/ml/cygwin-cvs/2003-q1/msg00352.html>
> <http://cygwin.com/ml/cygwin-cvs/2003-q1/msg00350.html>
> 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 <syslog.h>=0A=
#include <errno.h>=0A=
#include <sys/stat.h>=0A=
#include <sys/types.h>=0A=
#include <stdio.h>=0A=
#include <string.h>=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--
- Raw text -