Request: ChildProcess::getPID()


Hi Jules, can you add a getPID() to the ChildProcess class?

On Linux and Mac the POSIX shared code has a "childPID" variable that would be useful to know externally.

I patched my local juce to add getPID(), probably others will find it useful too.


I can't just add that for posix, I'd need to add a win32 version too, but that's different. Would prefer to keep platform-specific stuff out of the classes where possible. What do you need the ID for? Perhaps it'd be better to add the function that you're trying to implement?


I run custom made applications that can handle gtk and qt UIs (used in LV2) and I want the window mapped to my host.

One way to map the plugin window in this case is via _NET_WM_PID hint in X11.

When I know the PID of the child process it becomes easier to find windows created by it.


In any case I've patched this myself in my local juce source, I just though others might have a use for it.