Socket.accept problem via Socket.for_fd($stdin.fileno)

Hi,

I am experiencing a rather infuriating problem with Socket.accept on
Windows XP. The problem exists when I try to create a Socket from
for_fd whilst passing it $stdin.fileno - When the code tries to perform
a Socket.accept it responds with a rather vague error:

#<Errno::ENAMETOOLONG:Filename too long>

An example of the code would be:

server = Socket.for_fd($stdin.fileno)
ns, = server.accept

For those interested in background information (might help with my
case,) this code exists within the ‘Pure Ruby’ version of FastCGI. I am
trying to run the application as a FastCGI application, and to be
honest, I am tearing my hair out at times. :wink: I must have tried a dozen
different methods to get it working via FastCGIServer.

Any help is truly appreciated! Thanks in advance all.

Lee Skillen

Hi,

···

At Thu, 11 Sep 2003 22:14:17 +0900, Lee Skillen wrote:

I am experiencing a rather infuriating problem with Socket.accept on
Windows XP. The problem exists when I try to create a Socket from
for_fd whilst passing it $stdin.fileno - When the code tries to perform
a Socket.accept it responds with a rather vague error:

#<Errno::ENAMETOOLONG:Filename too long>

I guess this has been fixed already in CVS.

Wed Aug 27 05:10:15 2003 NAKAMURA Usaku usa@ruby-lang.org

    * win32/win32.c (map_errno): support winsock error.


Nobu Nakada