CNode

看同事写的代码我想知道这种写法是什么鬼?

问答
GGitHuber-lu发布于8 年前最后回复8 年前5 回复4023 浏览0 收藏

TIM截图20180420101847.png options 的stdio不是只有三个参数[stdin,stdout,stderr]吗,他前面三个设为Null,后面全部pipe,这是要闹哪样儿,这是干嘛的?求指点

查看回复

回复 (5)

M
MiYogurt#1·8 年前

Additional fds can be specified to create additional pipes between the parent and child 创建额外的信道。

M
MiYogurt#2·8 年前

subprocess.stdio[index] 来访问信道

N
nnliang#3·8 年前

他就是单纯的不想让你看懂

P
phper-chen#4·8 年前

https://nodejs.org/dist/latest-v8.x/docs/api/child_process.html#child_process_options_stdio

spawn('prg', [], { stdio: ['pipe', null, null, null, 'pipe'] });

Z
zhhb#5·8 年前

哎 好好看文档,再去看看exepath image.png image.png image.png

参与回复
登录后即可参与回复。登录