Browse Source

Allowed the use of stream flags in launchSlaveProcess

tags/2021-05-28
Joshua Gerrard 10 years ago
parent
commit
f0bb1ca635
2 changed files with 4 additions and 3 deletions
  1. +2
    -2
      modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp
  2. +2
    -1
      modules/juce_events/interprocess/juce_ConnectedChildProcess.h

+ 2
- 2
modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp View File

@@ -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);


+ 2
- 1
modules/juce_events/interprocess/juce_ConnectedChildProcess.h View File

@@ -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!


Loading…
Cancel
Save