#67 accept-connection loses with AF_UNIX

closed-fixed
run-time (53)
5
2002-04-28
2002-04-27
Anonymous
No

I'am using scsh 0.6.1

executing "
(bind-listen-accept-loop protocol-family/unix
do-message socket-name) " / accept-connection does
not work. Never calls do-message

lowlevel scheme_accept [from network1.c]
returns fixnum for protocol-family/unix
while it returns a cons-cell for
protocol-family/internet

and then [from network.scm]
(define (accept-connection sock)
...
(cond ((pair? fd-addr)
will not take this route and therfore
not do
(values ..)

but instead
(else (wait-for-channel ...
and hang there indefinitly
(strace shows only one accept
even if multiple conection attemps are made)

Discussion

  • Martin Gasbichler

    • labels: --> run-time
    • assigned_to: nobody --> mainzelm
    • status: open --> closed-fixed
     
  • Martin Gasbichler

    Logged In: YES
    user_id=17553

    The following patch will fix this. The returned address will
    be "" however, as this is what accept says.

    Index: network1.c

    RCS file: /cvsroot/scsh/scsh-0.6/scsh/network1.c,v
    retrieving revision 1.28
    diff -u -c -r1.28 network1.c
    *** network1.c 14 Feb 2002 14:00:27 -0000 1.28
    --- network1.c 28 Apr 2002 18:16:35 -0000
    ***************
    *** 173,180 ****
    s48_raise_out_of_memory_error();
    return S48_FALSE;
    }
    !
    ! return(s48_enter_fixnum (newsockfd));
    break;
    }
    case AF_INET:
    --- 173,181 ----
    s48_raise_out_of_memory_error();
    return S48_FALSE;
    }
    ! fcntl(newsockfd, F_SETFL, O_NONBLOCK);
    ! return(s48_cons (s48_enter_fixnum (newsockfd),
    !
    s48_enter_string (name.sun_path)));
    break;
    }
    case AF_INET:

    --
    Martin

     

Log in to post a comment.