Permalink
Browse files

Fix use of fcntl(.., F_CLOSEM)

  • Loading branch information...
1 parent 6463a06 commit d744c843ec1f0b6a56392eed61bc79ffc2139660 @FooBarWidget FooBarWidget committed Dec 7, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 ext/common/Utils.cpp
@@ -951,7 +951,7 @@ closeAllFileDescriptors(int lastToKeepOpen) {
#if defined(F_CLOSEM)
int ret;
do {
- ret = fcntl(fd, F_CLOSEM, lastToKeepOpen + 1);
+ ret = fcntl(lastToKeepOpen + 1, F_CLOSEM);
} while (ret == -1 && errno == EINTR);
if (ret != -1) {
return;

0 comments on commit d744c84

Please sign in to comment.