Correct fcntl(F_SETOWN) error check in non-Solaris sigio code

commit 64b7f96dca accidentally inverted the comparison, could
result in crashes on some systems later on.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
This commit is contained in:
Joel Bosveld 2009-04-24 10:12:26 -07:00 committed by Alan Coopersmith
parent 64b7f96dca
commit a1c98f7fa9

View File

@ -157,7 +157,7 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure)
xf86Msg(X_WARNING, "fcntl(%d, O_ASYNC): %s\n",
fd, strerror(errno));
} else {
if (fcntl(fd, F_SETOWN, getpid()) != -1) {
if (fcntl(fd, F_SETOWN, getpid()) == -1) {
xf86Msg(X_WARNING, "fcntl(%d, F_SETOWN): %s\n",
fd, strerror(errno));
} else {