Date: Fri, 11 Jan 2008 21:39:14 +0800 From: "SnaiX" <nayuhz@gmail.com> To: <freebsd-net@freebsd.org> Subject: the socket can't bind? Message-ID: <00a001c85457$5e9e9c00$1bdbd400$@com>
next in thread | raw e-mail | index | archive | help
Hi all, I attempt to run a program like this: 1. make a socket 2. set socket option with SO_REUSEADDR. 3. bind it 4. listen... accept...etc.. Alright, it works well. And I kill it, it can bind immediately. After this, I do: 5. close all fd. 6. reload it with execvp. So it would run 1-4. but it reports EADDRINUSE after bind. Why? How to resolve it? Should I dup() the fd? Thanks
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00a001c85457$5e9e9c00$1bdbd400$>