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

Discussion in 'Ruby' started by Lee Skillen, Sep 11, 2003.

  1. Lee Skillen

    Lee Skillen Guest

    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
     
    Lee Skillen, Sep 11, 2003
    #1
    1. Advertising

  2. Lee Skillen

    Guest

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

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


    --
    Nobu Nakada
     
    , Sep 11, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. chuck
    Replies:
    4
    Views:
    872
    chuck
    Jul 18, 2005
  2. mathieu
    Replies:
    5
    Views:
    3,847
    Joe Greer
    Mar 28, 2008
  3. Graham Dumpleton
    Replies:
    4
    Views:
    632
    Graham Dumpleton
    Feb 22, 2009
  4. Thomas Hafner

    load "/proc/self/fd/#{$stdin.fileno}"

    Thomas Hafner, Apr 19, 2009, in forum: Ruby
    Replies:
    3
    Views:
    105
    Thomas Hafner
    Apr 22, 2009
  5. Dean Arnold

    Finding all used fileno's ?

    Dean Arnold, Oct 19, 2003, in forum: Perl Misc
    Replies:
    2
    Views:
    116
    Lawrence DĀ¹Oliveiro
    Oct 24, 2003
Loading...

Share This Page