From b9174b828e055b3dac57348d69dc96cac67b1267 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 6 Jan 2015 22:03:44 +0900 Subject: [PATCH] nghttpx: Use util::make_socket_closeonexec instead of calling fcntl --- src/util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.cc b/src/util.cc index 1c8036d5..a4ab3f46 100644 --- a/src/util.cc +++ b/src/util.cc @@ -710,7 +710,7 @@ int reopen_log_file(const char *path) { // We get race condition if execve is called at the same time. if (fd != -1) { - fcntl(fd, F_SETFD, FD_CLOEXEC); + make_socket_closeonexec(fd); } #endif // !O_CLOEXEC