https://bugs.openldap.org/show_bug.cgi?id=9210
--- Comment #1 from Howard Chu hyc@openldap.org --- Sorry, your explanation for this patch makes no sense. If the sbi_write() actually succeeds, then ret will be >= 0. And the loop condition is if ((ret<0) && (errno==EINTR)) continue;
So if the write succeeds, errno is irrelevant. If the write actually fails, errno will be set to an actual value. As such, a forced reset of errno is not relevant.