From: Johannes Schindelin Date: Tue, 20 Dec 2005 10:40:05 GMT Subject: Re: [PATCH] xread/xwrite: do not worry about EINTR at calling sites. Message-ID: In-Reply-To: <7vvexkpoxf.fsf_-_@assigned-by-dhcp.cox.net> Hi, On Mon, 19 Dec 2005, Junio C Hamano wrote: > +static inline ssize_t xwrite(int fd, const void *buf, size_t len) > +{ > + ssize_t nr; > + while (1) { > + nr = write(fd, buf, len); > + if ((nr < 0) && (errno == EAGAIN || errno == EINTR)) > + continue; > + return nr; > + } > +} In another project I'm working on, a user insisted that on Solaris 2.7, write(2) sometimes returns ENOENT when it really means "try again". I cannot verify, since I don't have Solaris 2.7. Ciao, Dscho