From f0bb1ca6354ab0cd9598f04d950663c9a86b37a6 Mon Sep 17 00:00:00 2001 From: Joshua Gerrard Date: Tue, 1 Sep 2015 12:05:17 +0100 Subject: [PATCH] Allowed the use of stream flags in launchSlaveProcess --- .../juce_events/interprocess/juce_ConnectedChildProcess.cpp | 4 ++-- modules/juce_events/interprocess/juce_ConnectedChildProcess.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp b/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp index 74b6d88ab6..9ebdbb36ab 100644 --- a/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp +++ b/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp @@ -142,7 +142,7 @@ bool ChildProcessMaster::sendMessageToSlave (const MemoryBlock& mb) return false; } -bool ChildProcessMaster::launchSlaveProcess (const File& executable, const String& commandLineUniqueID, int timeoutMs) +bool ChildProcessMaster::launchSlaveProcess (const File& executable, const String& commandLineUniqueID, int timeoutMs, int streamFlags) { connection = nullptr; jassert (childProcess.kill()); @@ -153,7 +153,7 @@ bool ChildProcessMaster::launchSlaveProcess (const File& executable, const Strin args.add (executable.getFullPathName()); args.add (getCommandLinePrefix (commandLineUniqueID) + pipeName); - if (childProcess.start (args)) + if (childProcess.start (args, streamFlags)) { connection = new Connection (*this, pipeName, timeoutMs <= 0 ? defaultTimeoutMs : timeoutMs); diff --git a/modules/juce_events/interprocess/juce_ConnectedChildProcess.h b/modules/juce_events/interprocess/juce_ConnectedChildProcess.h index 7c91ed5888..75f67ca57c 100644 --- a/modules/juce_events/interprocess/juce_ConnectedChildProcess.h +++ b/modules/juce_events/interprocess/juce_ConnectedChildProcess.h @@ -157,7 +157,8 @@ public: */ bool launchSlaveProcess (const File& executableToLaunch, const String& commandLineUniqueID, - int timeoutMs = 0); + int timeoutMs = 0, + int streamFlags = ChildProcess::wantStdOut | ChildProcess::wantStdErr); /** This will be called to deliver a message from the slave process. The call will probably be made on a background thread, so be careful with your thread-safety!