accept: Invalid argument

From: erkan kolemen (erkankolemen_at_yahoo.com)
Date: 09/06/05

  • Next message: Sergey Babkin: "Re: Re: vn_fullpath() again"
    Date: Tue, 6 Sep 2005 08:15:52 -0700 (PDT)
    To: freebsd-hackers@freebsd.org
    
    

    Hi,

    In a daemon loop, i am using accept() to accept
    incoming connections.

    while(1) {
    if((fd = accept(socketd, (struct sockaddr *) &addr,
    &addrlen)) == -1) {
      syslog(LOG_ERR, "accept: %s", strerror(errno));
      continue;
    }
    else {
     ...
    }

    accept always fails. What is wrong? i could create
    socket and i got a positive integer value as socket
    descriptor. following is from syslog:

    Sep 6 17:20:50 devel pro[99227]: accept: Invalid
    argument
    Sep 6 17:21:20 devel last message repeated 204686
    times

    What is wrong? i am calling accept before fork().. So
    i don't think child process affecting parent process.

    thanks and regards...

            
                    
    ______________________________________________________
    Click here to donate to the Hurricane Katrina relief effort.
    http://store.yahoo.com/redcross-donate3/
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Sergey Babkin: "Re: Re: vn_fullpath() again"

    Relevant Pages

    • accept: Invalid argument
      ... incoming connections. ... accept always fails. ... socket and i got a positive integer value as socket ... i don't think child process affecting parent process. ...
      (freebsd-hackers)
    • Re: accept: Invalid argument
      ... > In a daemon loop, i am using acceptto accept ... > incoming connections. ... > socket and i got a positive integer value as socket ... > i don't think child process affecting parent process. ...
      (freebsd-hackers)
    • Re: accept: Invalid argument
      ... Did you issue listencall before accepting connections? ... > incoming connections. ... > socket and i got a positive integer value as socket ... > i don't think child process affecting parent process. ...
      (freebsd-hackers)
    • Re: Seeking UFFI for sockets on Linux
      ... >> know if I should trust the system not to leak fds. ... > I'm pretty sure you won't leak if the connect fails. ... I keep the socket object ... and add a SETF form for modifying the port ... ...
      (comp.lang.lisp)
    • Re: Error handling
      ... function calls to another function called "socket", ... bind fails, or E_SOCK if socket call fails, and the caller print a useful? ...
      (comp.lang.c)