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 83c359154..efe1bda73 100644
  3. --- a/modules/juce_core/native/juce_posix_SharedCode.h
  4. +++ b/modules/juce_core/native/juce_posix_SharedCode.h
  5. @@ -1266,6 +1266,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 8d15042fe..867e6fd2f 100644
  18. --- a/modules/juce_core/native/juce_win32_Threads.cpp
  19. +++ b/modules/juce_core/native/juce_win32_Threads.cpp
  20. @@ -489,6 +489,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 1e559b1c9..40ad651f0 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. +int 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 3c5e83bba..f6076fb82 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. + int getPID() const noexcept;
  52. +
  53. private:
  54. //==============================================================================
  55. class ActiveProcess;