开发者

How to capture the stdout of a running process which already has redirected it to /dev/null [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Dupli开发者_如何转开发cate:

How can a process intercept stdout and stderr of another process on Linux?

The process is already running and has all 0, 1, 2 redirected to /dev/null, how can I restore the stdout?

Thanks,


Analyzing ...

Possibility 1: you want to capture output that was redirected. You're out of luck.
Possibility 2: you want to capture output that will be redirected. Debug inject and call dup2.
Possibility 3: you are the process. Maybe try /dev/tty

.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜