projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e6b72e
)
Fix wrong error handling at Open() after open(2) in sync mode
author
avz
<a.arepo@gmail.com>
Sat, 25 Jun 2011 09:42:20 +0000
(
02:42
-0700)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Tue, 5 Jul 2011 00:05:37 +0000
(
02:05
+0200)
src/node_file.cc
patch
|
blob
|
history
diff --git
a/src/node_file.cc
b/src/node_file.cc
index
ad0c7b4
..
660e330
100644
(file)
--- a/
src/node_file.cc
+++ b/
src/node_file.cc
@@
-664,8
+664,8
@@
static Handle<Value> Open(const Arguments& args) {
ASYNC_CALL(open, args[3], *path, flags, mode)
} else {
int fd = open(*path, flags, mode);
- SetCloseOnExec(fd);
if (fd < 0) return ThrowException(ErrnoException(errno, NULL, "", *path));
+ SetCloseOnExec(fd);
return scope.Close(Integer::New(fd));
}
}