8000 child_process, feat: support inherit mode in execFile. · fibjs/fibjs@97309cb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 97309cb

Browse files
committed
child_process, feat: support inherit mode in execFile.
1 parent d3b5406 commit 97309cb

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

fibjs/src/process/child_process.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ result_t child_process_base::execFile(exlib::string command, v8::Local<v8::Array
148148
util_base::clone(options, opts_);
149149

150150
opts = v8::Local<v8::Object>::Cast(opts_);
151-
opts->Delete(opts->GetCreationContextChecked(), isolate->NewString("stdio")).IsJust();
152151

153152
exlib::string codec("utf8");
154153
GetConfigValue(isolate->m_isolate, opts, "encoding", codec);

test/child_process_test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,16 @@ describe("child_process", () => {
424424
]);
425425
});
426426

427+
it("inherit in execFile", () => {
428+
assert.isUndefined(child_process.execFile(cmd, [
429+
path.join(__dirname, "process", "exec2.js"),
430+
"参数1",
431+
"参数2"
432+
], {
433+
stdio: "inherit"
434+
}).stdout);
435+
});
436+
427437
it("execArgv", () => {
428438
assert.deepEqual(json.decode(child_process.execFile(cmd, [
429439
"--use_strict",

0 commit comments

Comments
 (0)
0