Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 Linux 上模拟给定进程中按下的键?Xorg 没有运行,输入由 DirectFB 处理
我认为您想使用管道将信息输入到其他进程。您的程序可以做的是关闭 stdio 输入文件描述符并打开您的程序用来写入进程的新文件描述符。您可能喜欢的一个很好的来源是 beejs guide to posix programming。查一下,有你需要的。
我不完全确定您要在这里完成什么……有关您的目标的更多信息将非常有帮助。
要在不同进程之间进行通信,您需要使用信号(或此处)或特定程序的 API(例如Xorg的开发 wiki)。