You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.0KB

  1. diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h
  2. index ad46cf390..13724ba7c 100644
  3. --- a/modules/juce_core/native/juce_posix_SharedCode.h
  4. +++ b/modules/juce_core/native/juce_posix_SharedCode.h
  5. @@ -1239,6 +1239,11 @@ public:
  6. return 0;
  7. }
  8. + int getPID() const noexcept
  9. + {
  10. + return childPID;
  11. + }
  12. +
  13. int childPID = 0;
  14. int pipeHandle = 0;
  15. int exitCode = -1;
  16. diff --git a/modules/juce_core/native/juce_win32_Threads.cpp b/modules/juce_core/native/juce_win32_Threads.cpp
  17. index 4a4148119..1c38ff2cf 100644
  18. --- a/modules/juce_core/native/juce_win32_Threads.cpp
  19. +++ b/modules/juce_core/native/juce_win32_Threads.cpp
  20. @@ -477,6 +477,11 @@ public:
  21. return (uint32) exitCode;
  22. }
  23. + int getPID() const noexcept
  24. + {
  25. + return 0;
  26. + }
  27. +
  28. bool ok;
  29. private:
  30. diff --git a/modules/juce_core/threads/juce_ChildProcess.cpp b/modules/juce_core/threads/juce_ChildProcess.cpp
  31. index 3b284c25a..31e9c8d94 100644
  32. --- a/modules/juce_core/threads/juce_ChildProcess.cpp
  33. +++ b/modules/juce_core/threads/juce_ChildProcess.cpp
  34. @@ -81,6 +81,11 @@ String ChildProcess::readAllProcessOutput()
  35. }
  36. +uint32 ChildProcess::getPID() const noexcept
  37. +{
  38. + return activeProcess != nullptr ? activeProcess->getPID() : 0;
  39. +}
  40. +
  41. //==============================================================================
  42. //==============================================================================
  43. #if JUCE_UNIT_TESTS
  44. diff --git a/modules/juce_core/threads/juce_ChildProcess.h b/modules/juce_core/threads/juce_ChildProcess.h
  45. index 47a26281b..74dbb11ab 100644
  46. --- a/modules/juce_core/threads/juce_ChildProcess.h
  47. +++ b/modules/juce_core/threads/juce_ChildProcess.h
  48. @@ -101,6 +101,8 @@ public:
  49. */
  50. bool kill();
  51. + uint32 getPID() const noexcept;
  52. +
  53. private:
  54. //==============================================================================
  55. class ActiveProcess;