Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: ignore EINTR in ztcp/zsocket accept()



Joshua Krusell wrote:
> -	{
> +	do {
> +	    rfd = accept(lfd, (struct sockaddr *)&soun, &len);
> +	} while (errno == EINTR && !errflag);

On success, errno is not set to zero. So if it happens to have a stray
value of EINTR before the loop, this could loop despite accept having
succeeded. Shouldn't rfd == -1 also be included in the condition?

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author