From: David E Euresti <davie@MIT.EDU>
To: <cygwin@cygwin.com>
Subject: fstat on sockets broken
Date: Fri, 07 Jun 2002 16:12:00 -0000 [thread overview]
Message-ID: <Pine.GSO.4.30L.0206071714090.16420-100000@scrubbing-bubbles.mit.edu> (raw)
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/
reply other threads:[~2002-06-07 21:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.GSO.4.30L.0206071714090.16420-100000@scrubbing-bubbles.mit.edu \
--to=davie@mit.edu \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).