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

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



On 10/08/15 at 02:18P, Oliver Kiddle wrote:
> 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

Right, of course...thanks!
/jsks



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