Program called to run via wine within a node.js script freezes

陌路散爱 提交于 2020-01-25 07:40:09

问题


Program called to run via wine within a node.js script freezes as soon as it starts to do it's task.

This is the top output:

It runs fine and display the cli's header if I call it without parameters.

But if use it with arguments it hangs as soon as it starts to display progress and continuous stdout (eg: the ones where the only thing that is updated in the screen is the percentage of the current task)

Tried with exec, execSync, spawnSync, spawn. Also tried to spawn and spawnSync a .sh file calling it (with and without & disown)

I think it has something to do with some child_process or even environment limitations, because I was able to do it by calling wine from a new gnome-terminal with parameters. But then I get an extra terminal window popping up, and no control whatsoever about the task conclusion.

Does anyone have a solution or a workaround for this?


回答1:


It was related to stdio

No idea why, but setting {stdio: ['inherit', 'pipe', 'pipe']} to .spawn() for Ubuntu and OSX did the trick.



来源:https://stackoverflow.com/questions/49054520/program-called-to-run-via-wine-within-a-node-js-script-freezes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!