[COMMITTERS] pgsql: Avoid depending on non-POSIX behavior of fcntl(2).

2017-04-21 Thread Tom Lane
Avoid depending on non-POSIX behavior of fcntl(2). The POSIX standard does not say that the success return value for fcntl(F_SETFD) and fcntl(F_SETFL) is zero; it says only that it's not -1. We had several calls that were making the stronger assumption. Adjust them to test specifically for -1 for

[COMMITTERS] pgsql: Avoid depending on non-POSIX behavior of fcntl(2).

2017-04-21 Thread Tom Lane
Avoid depending on non-POSIX behavior of fcntl(2). The POSIX standard does not say that the success return value for fcntl(F_SETFD) and fcntl(F_SETFL) is zero; it says only that it's not -1. We had several calls that were making the stronger assumption. Adjust them to test specifically for -1 for

[COMMITTERS] pgsql: Avoid depending on non-POSIX behavior of fcntl(2).

2017-04-21 Thread Tom Lane
Avoid depending on non-POSIX behavior of fcntl(2). The POSIX standard does not say that the success return value for fcntl(F_SETFD) and fcntl(F_SETFL) is zero; it says only that it's not -1. We had several calls that were making the stronger assumption. Adjust them to test specifically for -1 for

[COMMITTERS] pgsql: Avoid depending on non-POSIX behavior of fcntl(2).

2017-04-21 Thread Tom Lane
Avoid depending on non-POSIX behavior of fcntl(2). The POSIX standard does not say that the success return value for fcntl(F_SETFD) and fcntl(F_SETFL) is zero; it says only that it's not -1. We had several calls that were making the stronger assumption. Adjust them to test specifically for -1 for

[COMMITTERS] pgsql: Avoid depending on non-POSIX behavior of fcntl(2).

2017-04-21 Thread Tom Lane
Avoid depending on non-POSIX behavior of fcntl(2). The POSIX standard does not say that the success return value for fcntl(F_SETFD) and fcntl(F_SETFL) is zero; it says only that it's not -1. We had several calls that were making the stronger assumption. Adjust them to test specifically for -1 for

[COMMITTERS] pgsql: Avoid depending on non-POSIX behavior of fcntl(2).

2017-04-21 Thread Tom Lane
Avoid depending on non-POSIX behavior of fcntl(2). The POSIX standard does not say that the success return value for fcntl(F_SETFD) and fcntl(F_SETFL) is zero; it says only that it's not -1. We had several calls that were making the stronger assumption. Adjust them to test specifically for -1 for