How to background a process via proc_open and have access to STDIN?

半世苍凉 提交于 2019-12-01 22:16:21
cmbuckley

You can't write to STDIN of a background process (at least, not in the normal way).

This question on Server Fault may give you some idea of how to work around this problem.

Unrelated: you say do don't need outputs in the spec, yet you specify them im your $cmd; you can write $spec like this:

$spec = array (
    0 => array('pipe', 'r'),
    1 => array('file', 'out.log', 'w'), // or 'a' to append
    2 => array('file', 'err.log', 'w'),
);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!