Почему может блокироваться ioctl на участке кода:
int sd;
sd = socket(AF_INET, SOCK_DGRAM, 0); DBG("socket : %i\n", sd);
if(sd > 0)
{
struct ifconf ifconf;
struct ifreq ifreq[CFG_NETWORK_MAXIFCS]={0};
int interfaces;
int i,rc;
memset(&ifconf, 0, sizeof(struct ifconf));
// Point ifconf's ifc_buf to our array of interface ifreqs.
//ifconf.ifc_buf = (char *) ifreq;
ifconf.ifc_ifcu.ifcu_buf = (caddr_t)ifreq;
// Set ifconf's ifc_len to the length of our array of interface ifreqs.
ifconf.ifc_len = sizeof(ifreq);
DBG("ioctl start: %u\n", ifconf.ifc_len );
// Populate ifconf.ifc_buf (ifreq) with a list of interface names and addresses.
if ((rc=ioctl(sd, SIOCGIFCONF, &ifconf)) < 0 )
{
DBG("ioctl error: %i\n", rc );
goto error;
}
DBG("ioctl complete\n");
т.е. ни «ioctl complete», ни «ioctl error: » не печатаются, поток виснет.
После этого ifconfig также начинает виснуть
?