in reply to In Solaris accept() is not restarted [on Solaris] ...

No, I don’t think that’s the problem, I worked on telecom systems on Solaris for years, and this never happened to me (accept does not restart???, it is too basic to allow a bug).

By reading your code, I can see that your program will quit the outmost while loop, when accept() call fails (In array context, it returns empty array, which is evaluated to false). I don’t think that’s what you want, and it most likely confused you as what is the reason that it is not accepting connection any more.

Also it is not a good idea, for quite a few OS systems, to create socket with no timeout. This makes the wake up very slow, and probably even hang.

  • Comment on Re: In Solaris accept() is not restarted [on Solaris] ...

Replies are listed 'Best First'.
Re: Re: In Solaris accept() is not restarted [on Solaris] ...
by TASdvlper (Monk) on Oct 24, 2003 at 22:06 UTC
    Actually, I read that in a different node (it's not something I investigated) accept()

    I just started network programming a few days ago (how's that for being a newbie ?). So, still have a lot to learn.
    Do you have any better suggestions on how the while loop should be constructed ? What's a good recommended timeout ?
    Thx.