[distcc] errno not reset by connect(2)
Martin Pool
mbp at sourcefrog.net
Fri Nov 12 03:15:16 GMT 2004
On 5 Nov 2004, Daniel Kegel <dank at kegel.com> wrote:
> Oh, I see now. It's the line after Jean's patch where
> distcc checks errno:
>
> while ((connect(fd, sa, salen) == -1) && errno == EINTR)
> ;
>
> if (errno && errno != EINPROGRESS) {
>
> So Jean's patch is right. It might be cleaner to avoid
> setting errno, though, and write this all as
>
> int failed = 0;
> do
> failed = connect(fd, sa, salen);
> while (failed && errno == EINTR);
>
> if (failed && errno != EINPROGRESS) {
Or you could even omit the initial assignment.
Thanks, guys. There are actually several of these. I will do a
2.18.2 soon, plus a fix for bugs.debian.org/280399.
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/distcc/attachments/20041112/56150e79/attachment.bin
More information about the distcc
mailing list