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

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

Post by Lee Skille » Fri, 12 Sep 2003 22:14:17


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

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

Post by nobu.nokad » Fri, 12 Sep 2003 22:41:09

Hi,

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


I guess this has been fixed already in CVS.

Wed Aug 27 05:10:15 2003 NAKAMURA Usaku < XXXX@XXXXX.COM >

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


--
Nobu Nakada