public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] about fdopen
@ 2001-03-25 23:04 ylyuan
  0 siblings, 0 replies; only message in thread
From: ylyuan @ 2001-03-25 23:04 UTC (permalink / raw)
  To: ecos-discuss

Hi,part of my program is :
    static FILE *sfp;
    if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
        printf("error to creat a socket\n");
        exit(1);
    }
    if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
        printf("error to connect\n");
        exit(1);
    }
    if ((sfp = fdopen(s, "w")) == 0) {
        printf("error to fdopen s\n");
        exit(1);
    }
 
    socket() and connect() are right,but fdopen() can't return,who can tell me why?
    Thanks a lot!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-03-25 23:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-25 23:04 [ECOS] about fdopen ylyuan

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).