* fstat on sockets broken
@ 2002-06-07 16:12 David E Euresti
0 siblings, 0 replies; only message in thread
From: David E Euresti @ 2002-06-07 16:12 UTC (permalink / raw)
To: cygwin
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/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-06-07 21:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-07 16:12 fstat on sockets broken David E Euresti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).