09-23-05 02:01 AM
On Wed, 21 Sep 2005 20:50:23 -0400 Michael B Allen <mba2000@ioplex.com> wrote:
> SO_REUSEADDR seems to have no effect on an AF_UNIX socket. Trying to
> bind(2) the socket after close(2)ing (or exit(2)ing) results in the
> EADDRINUSE "Address already in use". I must unlink the corresponding
> file before the bind will succeed.
>
> This is a pity because I want my code to be generic in ways that it
> cannot if I'm required to delete some file each time. Can someone
> recommend a solution to this problem? Is there some kind of unlink on
> close(2) control?
How about using the loopback (AF_INET) interface instead of unix
domain. I don't really get it though, how unlink() would be a
problem. Certainly whever you have support for unix domain sockets
you have support for unlink(). Interesting.
-frank
[ Post a follow-up to this message ]
|