forks/pipes and std.socket

2010-09-05 Thread Nick Sabalausky
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 the

Re: forks/pipes and std.socket

2010-09-07 Thread Masahiro Nakagawa
On Mon, 06 Sep 2010 05:32:28 +0900, Nick Sabalausky 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

Re: forks/pipes and std.socket

2010-09-07 Thread Kagamin
Nick Sabalausky Wrote: > 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? There's no fork on windows. If you want a multithreaded server, it's usually implemented with threads on windows.

Re: forks/pipes and std.socket

2010-09-07 Thread Nick Sabalausky
"Kagamin" wrote in message news:i660qi$nu...@digitalmars.com... > Nick Sabalausky Wrote: > >> 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? > > There's no fork on windows. If you want a multithreaded server, it's

Re: forks/pipes and std.socket

2010-09-07 Thread Steven Schveighoffer
On Tue, 07 Sep 2010 14:54:46 -0400, Nick Sabalausky wrote: "Kagamin" wrote in message news:i660qi$nu...@digitalmars.com... Nick Sabalausky Wrote: 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? There's no fork on wi

Re: forks/pipes and std.socket

2010-09-07 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.vioibdr2eav...@localhost.localdomain... > On Tue, 07 Sep 2010 14:54:46 -0400, Nick Sabalausky wrote: > >> "Kagamin" wrote in message >> news:i660qi$nu...@digitalmars.com... >>> Nick Sabalausky Wrote: >>> Does anyone who's done this sort of th

Re: forks/pipes and std.socket

2010-09-08 Thread Steven Schveighoffer
On Tue, 07 Sep 2010 16:51:48 -0400, Nick Sabalausky wrote: "Steven Schveighoffer" wrote in message news:op.vioibdr2eav...@localhost.localdomain... On Tue, 07 Sep 2010 14:54:46 -0400, Nick Sabalausky wrote: "Kagamin" wrote in message news:i660qi$nu...@digitalmars.com... Nick Sabalausky Wr

Re: forks/pipes and std.socket

2010-09-09 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.vipr20xfeav...@localhost.localdomain... > On Tue, 07 Sep 2010 16:51:48 -0400, Nick Sabalausky wrote: > >> >> Ah cool, looking forward to it. I was just about ready to launch into a >> bunch of std.process improvements myself ;) In the meantime, it

Re: forks/pipes and std.socket

2010-09-09 Thread Steven Schveighoffer
On Thu, 09 Sep 2010 16:25:44 -0400, Nick Sabalausky wrote: "Steven Schveighoffer" wrote in message news:op.vipr20xfeav...@localhost.localdomain... On Tue, 07 Sep 2010 16:51:48 -0400, Nick Sabalausky wrote: Ah cool, looking forward to it. I was just about ready to launch into a bunch of st

Re: forks/pipes and std.socket

2010-09-09 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.vir82cineav...@localhost.localdomain... > On Thu, 09 Sep 2010 16:25:44 -0400, Nick Sabalausky wrote: > >> "Steven Schveighoffer" wrote in message >> news:op.vipr20xfeav...@localhost.localdomain... >>> On Tue, 07 Sep 2010 16:51:48 -0400, Nick Sabal

Re: forks/pipes and std.socket

2010-09-10 Thread Steven Schveighoffer
On Thu, 09 Sep 2010 18:29:55 -0400, Nick Sabalausky wrote: Maybe the OS is just allowing me to use the wrong file descriptor? OK, after downloading the latest dmd, testing your code, and perplexing a while, then reading the source of phobos, I realized that you are using std.stream.File,

Re: forks/pipes and std.socket

2010-09-10 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.vitle0kgeav...@localhost.localdomain... > On Thu, 09 Sep 2010 18:29:55 -0400, Nick Sabalausky wrote: > > >> Maybe the OS is just allowing me to use the wrong file descriptor? > > OK, after downloading the latest dmd, testing your code, and perplexi