From 6cb15403d342080fc0ecf0b2675852090fcfb1aa Mon Sep 17 00:00:00 2001 From: Igor Zinkovsky Date: Wed, 14 Sep 2011 13:27:44 -0700 Subject: [PATCH] remove SetCloseOnExec --- src/node_file.cc | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/node_file.cc b/src/node_file.cc index b4c60b6865..522738a482 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -62,15 +62,6 @@ Local FSError(int errorno, const char *path = NULL); -static inline bool SetCloseOnExec(int fd) { -#ifdef __POSIX__ - return (fcntl(fd, F_SETFD, FD_CLOEXEC) != -1); -#else // __MINGW32__ - return SetHandleInformation(reinterpret_cast(_get_osfhandle(fd)), - HANDLE_FLAG_INHERIT, 0) != 0; -#endif -} - #ifdef _LARGEFILE_SOURCE static inline int IsInt64(double x) { return x == static_cast(static_cast(x)); @@ -140,7 +131,6 @@ static void After(uv_fs_t *req) { break; case UV_FS_OPEN: - SetCloseOnExec(req->result); /* pass thru */ case UV_FS_SENDFILE: argv[1] = Integer::New(req->result); @@ -731,7 +721,6 @@ static Handle Open(const Arguments& args) { } else { SYNC_CALL(open, *path, *path, flags, mode) int fd = SYNC_RESULT; - SetCloseOnExec(fd); return scope.Close(Integer::New(fd)); } }