I'm launching a command-line program (Perforce) from within a JUCE application and want to process the output of that program. I do this by creating a ChildProcess and calling start() on it, then periodically calling readProcessOutput() to update a string containing the resulting output. I do this rather than calling readAllProcessOutput() because some commands take a while to complete so I run this in another thread and pass the updates back to the GUI thread via a message.
I place the filename of the executable in quotes to safe-guard against spaces in the path, and this works on Windows but on OSX I am experiencing a problem. If the path to the executable includes a space, the call to start() doesn't return an error, but the child process fails to launch and the output contains a stream of JUCE errors from the LeakedObjectDetector.
This same error occurs if the program being launched can't be found. I've put a check in my code for missing programs, but there are some programs I need to call that include a space in the path. Does anybody know a way of working around this?