FIFO中的命名管道? [英] FIFO /Named Pipes in D?
问题描述
我尝试执行以下操作:
一个中央应用程序,让我们称之为alpha,接受命令行中的用户输入,并基于这些输入,其他进程,称为bravo,charlie等。我想让父母和孩子以这种方式沟通。也就是说,alpha可以读取和写入bravo(或charlie)和反之亦然
A central application, let us call it alpha, accepts user inputs in command lines, and based on those inputs, spawns other processes, call them bravo, charlie, etc. I want the parent and child to communicate both way. That is, alpha can read from and write to bravo (resp. charlie) and vice-versa
在C ++中,我可以使用fork使用FIFO-s - 一些优秀的教程,在这里:
管道,Fork和Exec - 父进程和子进程之间的双向通信
和
http://pronix.linuxdelta.de/C/Linuxprogrammierung/Linuxsystemprogrammieren_C_Kurs_Kapitel5b.shtml
In C++, i can use fork() then exec(), and use FIFO-s - some excellent tutorials, are here : Pipe, Fork, and Exec - Two Way Communication Between Parent and Child Process and http://pronix.linuxdelta.de/C/Linuxprogrammierung/Linuxsystemprogrammieren_C_Kurs_Kapitel5b.shtml
但是,我想知道是否一样,在D中也是可能的?
But, I am wondering if the same, is also possible in D? I dont find much from web searching.
推荐答案
看起来D的标准库支持创建管道和子进程。
It looks like D's standard library supports creating pipes and child processes.
http://dlang.org/phobos/std_process.html
这篇关于FIFO中的命名管道?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!