socket programming - accept blocking - Mailing list pgsql-cygwin

From Ryan
Subject socket programming - accept blocking
Date
Msg-id loom.20041201T192605-784@post.gmane.org
Whole thread Raw
List pgsql-cygwin
I am in the process of learning about socket programming.  I am creating a
simple web server that accepts a connection and provides the requested file.  I
have tested my code on a true linux machine and it works fine.  I am having
problems getting it to work properly in Cygwin.

The faulty segmet of code is:

    if ((s_curr = accept(s, (struct sockaddr *) &pin, &addrlen)) == -1)
    {
        printf("ERROR: accept\n");
    }

    printf("Connection Received\n");

The accept command does not block, so everytime I try to start up the server, I
immediately get the ERROR message.

Like I said, this code works perfectly on a true linux machine, so I was
wondering why it is not working in Cygwin.  Does anybody have any suggestions?

Thanks,

Ryan

pgsql-cygwin by date:

Previous
From: Reini Urban
Date:
Subject: Re: src/timezone/pgtz __imp__my_exec_path
Next
From: Asheesh
Date:
Subject: Data Migration from version 7.2.1 to version 7.4.3