Browse Source

Add ChildProcess::getPID()

Signed-off-by: falkTX <falktx@falktx.com>
v6.1.6-distrho
falkTX 3 years ago
parent
commit
95e4650922
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

@@ -1260,6 +1260,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

@@ -487,6 +487,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