The value that should be set for flags of the fcntl() is FD_CLOEXEC.
This patch modifies to use FD_CLOEXEC instead of O_CLOEXEC.
Change-Id: I443a54ba18098d1bd2f094cdb081ad6b54fbd02b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
void ClientSocket::SetCloseOnExec() {
int flags = fcntl(fd_, F_GETFL, 0);
- fcntl(fd_, F_SETFL, flags | O_CLOEXEC);
+ fcntl(fd_, F_SETFL, flags | FD_CLOEXEC);
_I("Close on exec. fd(%d)", fd_);
}
void ServerSocket::SetCloseOnExec() {
int flags = fcntl(fd_, F_GETFL, 0);
- fcntl(fd_, F_SETFL, flags | O_CLOEXEC);
+ fcntl(fd_, F_SETFL, flags | FD_CLOEXEC);
_I("Close on exec. fd(%d)", fd_);
}
// LCOV_EXCL_STOP