Re: Spawning a process: Can I "have my cake and eat it too"?

2018-03-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/2/18 9:23 AM, Steven Schveighoffer wrote: On 3/1/18 11:50 PM, Nick Sabalausky (Abscissa) wrote: How could this be accomplished? Is it even possible? You'd have to do this in the parent. You can duplicate the file descriptor, so that writing to either goes to the same spot, but you

Re: Spawning a process: Can I "have my cake and eat it too"?

2018-03-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/1/18 11:50 PM, Nick Sabalausky (Abscissa) wrote: I'd like to include this functionality in Scriptlike, but I don't know if it's even possible: Launch a process (spawnProcess, pipeShell, etc) so the child's stdout/stderr go to the parent's stdout/stderr *without* the possibility of them

Re: Spawning a process: Can I "have my cake and eat it too"?

2018-03-01 Thread Vladimir Panteleev via Digitalmars-d-learn
On Friday, 2 March 2018 at 04:50:06 UTC, Nick Sabalausky (Abscissa) wrote: Launch a process (spawnProcess, pipeShell, etc) so the child's stdout/stderr go to the parent's stdout/stderr *without* the possibility of them getting inadvertently reordered/reinterleaved when viewed on the terminal,

Re: Spawning a process: Can I "have my cake and eat it too"?

2018-03-01 Thread Adam D. Ruppe via Digitalmars-d-learn
I would suggest redirecting the child to the parent pipe, but then having the parent write the data back out to its own stdout/err. It'd be a bit tricky with just Phobos' file though because it doesn't make it easy to wait for or be notified about input on it, but the underlying OS apis make

Spawning a process: Can I "have my cake and eat it too"?

2018-03-01 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-learn
I'd like to include this functionality in Scriptlike, but I don't know if it's even possible: Launch a process (spawnProcess, pipeShell, etc) so the child's stdout/stderr go to the parent's stdout/stderr *without* the possibility of them getting inadvertently reordered/reinterleaved when