Browse Source

Add ChildProcess::getPID() call

Signed-off-by: falkTX <falktx@falktx.com>
v6.0.8-distrho
falkTX 2 years ago
parent
commit
7305dfffe3
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 17 additions and 0 deletions
  1. +5
    -0
      modules/juce_core/native/juce_posix_SharedCode.h
  2. +5
    -0
      modules/juce_core/native/juce_win32_Threads.cpp
  3. +5
    -0
      modules/juce_core/threads/juce_ChildProcess.cpp
  4. +2
    -0
      modules/juce_core/threads/juce_ChildProcess.h

+ 5
- 0
modules/juce_core/native/juce_posix_SharedCode.h View File

@@ -1239,6 +1239,11 @@ public:
return 0;
}
int getPID() const noexcept
{
return childPID;
}
int childPID = 0;
int pipeHandle = 0;
int exitCode = -1;


+ 5
- 0
modules/juce_core/native/juce_win32_Threads.cpp View File

@@ -477,6 +477,11 @@ public:
return (uint32) exitCode;
}
int getPID() const noexcept
{
return 0;
}
bool ok;
private:


+ 5
- 0
modules/juce_core/threads/juce_ChildProcess.cpp View File

@@ -81,6 +81,11 @@ String ChildProcess::readAllProcessOutput()
}
uint32 ChildProcess::getPID() const noexcept
{
return activeProcess != nullptr ? activeProcess->getPID() : 0;
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS


+ 2
- 0
modules/juce_core/threads/juce_ChildProcess.h View File

@@ -101,6 +101,8 @@ public:
*/
bool kill();
uint32 getPID() const noexcept;
private:
//==============================================================================
class ActiveProcess;


Loading…
Cancel
Save