Off-topic for comp.lang.c
Please ask in comp.unix.programmer, where it's more appropriate,
assuming you're talking about POSIX bind.
(I'm setting follow-ups there)
You can examine errno.
if(bind(...) == -1) {
if(errno == EADDRINUSE) { /* ... */ }
else if(...)
}
The errors are listed in the following link, under ERRORS.
<http://www.opengroup.org/onlinepubs/009695399/functions/bind.html>
Um, this *is* comp.unix.programmer!