September 05, 2010 forks/pipes and std.socket | ||||
---|---|---|---|---|
| ||||
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? |
September 07, 2010 Re: forks/pipes and std.socket | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | 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). |
Copyright © 1999-2021 by the D Language Foundation