Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b454a76

Browse filesBrowse files
theanarkhjuanarbol
authored andcommitted
src: keep PipeWrap::Open function consistent with TCPWrap
PR-URL: #46064 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 5539977 commit b454a76
Copy full SHA for b454a76

File tree

Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed
Open diff view settings
Collapse file

‎src/pipe_wrap.cc‎

Copy file name to clipboardExpand all lines: src/pipe_wrap.cc
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,9 @@ void PipeWrap::Open(const FunctionCallbackInfo<Value>& args) {
217217
if (!args[0]->Int32Value(env->context()).To(&fd)) return;
218218

219219
int err = uv_pipe_open(&wrap->handle_, fd);
220-
wrap->set_fd(fd);
220+
if (err == 0) wrap->set_fd(fd);
221221

222-
if (err != 0)
223-
env->ThrowUVException(err, "uv_pipe_open");
222+
args.GetReturnValue().Set(err);
224223
}
225224

226225

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.