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
1.9KB

  1. diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h
  2. index ea007b1..f6faa5b 100644
  3. --- a/modules/juce_core/native/juce_posix_SharedCode.h
  4. +++ b/modules/juce_core/native/juce_posix_SharedCode.h
  5. @@ -1234,6 +1234,11 @@ public:
  6. return 0;
  7. }
  8. + int getPID() const noexcept
  9. + {
  10. + return childPID;
  11. + }
  12. +
  13. int childPID;
  14. private:
  15. diff --git a/modules/juce_core/native/juce_win32_Threads.cpp b/modules/juce_core/native/juce_win32_Threads.cpp
  16. index 68d891f..d38b733 100644
  17. --- a/modules/juce_core/native/juce_win32_Threads.cpp
  18. +++ b/modules/juce_core/native/juce_win32_Threads.cpp
  19. @@ -488,6 +488,11 @@ public:
  20. return (uint32) exitCode;
  21. }
  22. + int getPID() const noexcept
  23. + {
  24. + return 0;
  25. + }
  26. +
  27. bool ok;
  28. private:
  29. diff --git a/modules/juce_core/threads/juce_ChildProcess.cpp b/modules/juce_core/threads/juce_ChildProcess.cpp
  30. index 5648c5d..262882b 100644
  31. --- a/modules/juce_core/threads/juce_ChildProcess.cpp
  32. +++ b/modules/juce_core/threads/juce_ChildProcess.cpp
  33. @@ -75,6 +75,11 @@ String ChildProcess::readAllProcessOutput()
  34. return result.toString();
  35. }
  36. +uint32 ChildProcess::getPID() const noexcept
  37. +{
  38. + return activeProcess != nullptr ? activeProcess->getPID() : 0;
  39. +}
  40. +
  41. //==============================================================================
  42. #if JUCE_UNIT_TESTS
  43. diff --git a/modules/juce_core/threads/juce_ChildProcess.h b/modules/juce_core/threads/juce_ChildProcess.h
  44. index b2bd0e1..cbc380d 100644
  45. --- a/modules/juce_core/threads/juce_ChildProcess.h
  46. +++ b/modules/juce_core/threads/juce_ChildProcess.h
  47. @@ -99,6 +99,8 @@ public:
  48. */
  49. bool kill();
  50. + uint32 getPID() const noexcept;
  51. +
  52. private:
  53. //==============================================================================
  54. class ActiveProcess;