Re: piping processes

2011-12-01 Thread Steven Schveighoffer
On Thu, 01 Dec 2011 08:24:25 -0500, Steven Schveighoffer wrote: On Thu, 01 Dec 2011 06:10:00 -0500, Regan Heath wrote: std.process is rather limited in it's current incarnation but I think Steve is working on a bit update.. It's ready for review, but I'm waiting on myself to get a pull

Re: piping processes

2011-12-01 Thread Steven Schveighoffer
On Thu, 01 Dec 2011 06:10:00 -0500, Regan Heath wrote: On Wed, 30 Nov 2011 23:35:58 -, NMS wrote: Is there a cross-platform way to create a new process and get its i/o streams? Like java.lang.Process? No. It different on windows and unix platforms, tho most/many of the unix platf

Re: piping processes

2011-12-01 Thread Andrej Mitrovic
> On 12/1/11, Regan Heath wrote: >> you should (ideally) be closing childStdoutWrite and >> childStdinRead /after/ CreateProcess. If you don't you get 2 copies of >> them, one in the child and one in the parent. Ok so I should move CloseHandle(childStdoutWrite) immediately after a successful cal

Re: piping processes

2011-12-01 Thread Andrej Mitrovic
On 12/1/11, Regan Heath wrote: > I know these are basic examples, but I think in RedirectChildHandle.d, > CreateChildProcess, you should (ideally) be closing childStdoutWrite and > childStdinRead /after/ CreateProcess. If you don't you get 2 copies of > them, one in the child and one in the paren

Re: piping processes

2011-12-01 Thread Regan Heath
On Thu, 01 Dec 2011 11:29:52 -, Andrej Mitrovic wrote: I can't find my thread in the archives yet, but I made a similar inquiry a few days ago. You can see a few examples for Windows here: https://github.com/AndrejMitrovic/DWinProgramming/tree/master/Samples/Extra/RedirectChildHandle htt

Re: piping processes

2011-12-01 Thread Regan Heath
On Thu, 01 Dec 2011 11:28:50 -, Dejan Lekic wrote: We talked about that too on IRC - the conclusion was - we should have std.pipe module with (at least) AnonymousPipe, and NamedPipe classes. Definitely. I will have a hunt for my misplaced code but it had some sort of pipe class which

Re: piping processes

2011-12-01 Thread Dejan Lekic
We talked about that too on IRC - the conclusion was - we should have std.pipe module with (at least) AnonymousPipe, and NamedPipe classes.

Re: piping processes

2011-12-01 Thread Andrej Mitrovic
I can't find my thread in the archives yet, but I made a similar inquiry a few days ago. You can see a few examples for Windows here: https://github.com/AndrejMitrovic/DWinProgramming/tree/master/Samples/Extra/RedirectChildHandle https://github.com/AndrejMitrovic/DWinProgramming/tree/master/Sample

Re: piping processes

2011-12-01 Thread Dejan Lekic
NMS wrote: > Is there a cross-platform way to create a new process and get its i/o > streams? Like java.lang.Process? I doubt. However, you can use platform-specific popen() (POSIX) and _popen() (Windows) for that. I recently talked about this on IRC. At the moment Phobos uses system() , redire

Re: piping processes

2011-12-01 Thread Regan Heath
On Wed, 30 Nov 2011 23:35:58 -, NMS wrote: Is there a cross-platform way to create a new process and get its i/o streams? Like java.lang.Process? No. It different on windows and unix platforms, tho most/many of the unix platforms are similar. std.process is rather limited in it's cu