@@ -174,6 +174,32 @@ class JUCE_API ChildProcessCoordinator
174174 int timeoutMs = 0 ,
175175 int streamFlags = ChildProcess::wantStdOut | ChildProcess::wantStdErr);
176176
177+ /* * Attempts to launch and connect to a worker process by command line.
178+
179+ The first argument should be the name of the executable file, followed by any other
180+ arguments that are needed.
181+ This will start the given executable, passing it a special command-line
182+ parameter as first argument based around the commandLineUniqueID string, which must be a
183+ short alphanumeric string (no spaces!) that identifies your app. The exe
184+ that gets launched must respond by calling ChildProcessWorker::initialiseFromCommandLine()
185+ in its startup code, and must use a matching ID to commandLineUniqueID.
186+
187+ The timeoutMs parameter lets you specify how long the child process is allowed
188+ to go without sending a ping before it is considered to have died and
189+ handleConnectionLost() will be called. Passing <= 0 for this timeout makes
190+ it use a default value.
191+
192+ If this all works, the method returns true, and you can begin sending and
193+ receiving messages with the worker process.
194+
195+ If a child process is already running, this will call killWorkerProcess() and
196+ start a new one.
197+ */
198+ bool launchWorkerProcess (const StringArray& arguments,
199+ const String& commandLineUniqueID,
200+ int timeoutMs = 0 ,
201+ int streamFlags = ChildProcess::wantStdOut | ChildProcess::wantStdErr);
202+
177203 [[deprecated (" Replaced by launchWorkerProcess." )]]
178204 bool launchSlaveProcess (const File& executableToLaunch,
179205 const String& commandLineUniqueID,
0 commit comments