【发布时间】:2014-11-26 10:29:15
【问题描述】:
在由本地进程(Yate 电话引擎的 extmodule)通过 shell 脚本启动的 Java 进程中,可以连接到 STDIN 和 STDOUT 以与进程通信并将日志消息写入 STDERR。
Yate 的 extmodule 的描述中提到了两个额外的文件描述符 3 和 4:
The external user application or script comunicates with the module trough several file descriptors:
0 (stdin) - Carries commands and notifications from engine to application
1 (stdout) - Carries commands and answers from application to the engine
2 (stderr) - Has the usual meaning of reporting errors and is directed to the engine's stderr or logfile
3 (optional) - Transports audio data from the engine to the application
4 (optional) - Transports audio data from the application to the engine
File descriptors 3 and 4 are open only for audio capable applications.
是否可以连接到那些可选的文件描述符,如果可以,如何连接?我知道我可以使用 System.in、System.out 和 System.err 来表示 0、1 和 2,但是其他的呢?
【问题讨论】: