This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
fstat on sockets broken
- From: David E Euresti <davie at MIT dot EDU>
- To: <cygwin at cygwin dot com>
- Date: Fri, 7 Jun 2002 17:21:45 -0400 (EDT)
- Subject: fstat on sockets broken
Hello,
The following code returns with
fstat: No such file or directory
which is not what unix does.
I can work around it but just thought I'd let you know.
#include <stdio.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
int main() {
struct stat sbuf;
int fd = socket(AF_INET, SOCK_STREAM, 0);
if (fstat(fd, &sbuf) < 0) {
printf("fstat: %s\n", strerror(errno));
exit(0);
}
}
David
--
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/