It says "got here1", doesn't say "got here2", and the process doesn't die.
Since it isn't reading anything from sockfd which is "listen"ing, I expect
it to fail. Is it too much to ask it to fail? I could set up a kqueue for
sockfd to wait for a read, which I am going to do, but since it appears to
be a bug, I figured reporting it would be a nice thing to do.
printf("got here1\n");
fflush(stdout);
for(;;)
{
newsockfd = accept4(sockfd,
(struct sockaddr*) &cli_addr, &clilen,
SOCK_NONBLOCK);
printf("got here2\n");
fflush(stdout);
if(newsockfd > 0)
break;
printf("got here3\n");
fflush(stdout);
i = kevent(kqIn, NULL, 0, &ke, 1, &timeout);
if (i == -1) err(1, "kevent failed");
if (i != 0)
{
return 0;
}
}
On Tue, Dec 27, 2016 at 5:55 PM Jeremie Courreges-Anglas <[email protected]>
wrote:
>
> Your report is lacking, you're forcing people to guess what your problem
> actually is. IOW, show the code, what it does on your machine, and what
> you expect it to do.
>
> --
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
>