Lines 674-684
Link Here
|
674 |
int s, xflags; |
674 |
int s, xflags; |
675 |
|
675 |
|
676 |
if ((s = socket(domain, type, protocol)) == -1) |
676 |
if ((s = socket(domain, type, protocol)) == -1) |
677 |
return -1; |
677 |
return -1; |
678 |
if ((flags & O_CLOEXEC) && (xflags = fcntl(s, F_GETFD, 0)) == -1 || |
678 |
if ((flags & O_CLOEXEC) && (xflags = fcntl(s, F_GETFD, 0)) == -1 || |
679 |
fcntl(s, F_SETFD, xlags | FD_CLOEXEC) == -1) |
679 |
fcntl(s, F_SETFD, xflags | FD_CLOEXEC) == -1) |
680 |
goto out; |
680 |
goto out; |
681 |
if ((flags & O_NONBLOCK) && (xflags = fcntl(s, F_GETFL, 0)) == -1 || |
681 |
if ((flags & O_NONBLOCK) && (xflags = fcntl(s, F_GETFL, 0)) == -1 || |
682 |
fcntl(s, F_SETFL, xflags | O_NONBLOCK) == -1) |
682 |
fcntl(s, F_SETFL, xflags | O_NONBLOCK) == -1) |
683 |
goto out; |
683 |
goto out; |
684 |
return s; |
684 |
return s; |