digitalmars.D.learn - forks/pipes and std.socket
- "Nick Sabalausky" <a a.a> Sep 05 2010
- "Masahiro Nakagawa" <repeatedly gmail.com> Sep 07 2010
This may be a stupid question:
Does std.socket encorporate or replace pipe usage? Ie, if I'm going to do
something along the lines of (psuedo-code):
auto parentToChild = pipe();
auto childToParent = pipe();
if(fork())
{
// talk to other process
}
else
{
// talk to other process
}
Is there anything in std.socket, or any way of using it that would aid in
this sort of thing (ideally in a cross-platform way), or is it entirely
orthogonal to this?
Does anyone who's done this sort of thing in D before, on Win or Lin, know
of anything else in particular to be aware of?
Sep 05 2010
On Mon, 06 Sep 2010 05:32:28 +0900, Nick Sabalausky <a a.a> wrote:This may be a stupid question: Does std.socket encorporate or replace pipe usage? Ie, if I'm going to do something along the lines of (psuedo-code): auto parentToChild = pipe(); auto childToParent = pipe(); if(fork()) { // talk to other process } else { // talk to other process } Is there anything in std.socket, or any way of using it that would aid in this sort of thing (ideally in a cross-platform way), or is it entirely orthogonal to this? Does anyone who's done this sort of thing in D before, on Win or Lin, know of anything else in particular to be aware of?
Unix domain socket? http://lists.puremagic.com/pipermail/phobos/2010-July/001171.html This socket I rewrote can communicate with other processes using LocalEndpoint. (Sorry, I don't know Windows environment).
Sep 07 2010








"Masahiro Nakagawa" <repeatedly gmail.com>