diff --git a/Libraries/LibCore/System.cpp b/Libraries/LibCore/System.cpp index de3aab10667..500e8eaec08 100644 --- a/Libraries/LibCore/System.cpp +++ b/Libraries/LibCore/System.cpp @@ -999,4 +999,9 @@ ErrorOr set_resource_limits(int resource, rlim_t limit) return {}; } +int getpid() +{ + return ::getpid(); +} + } diff --git a/Libraries/LibCore/System.h b/Libraries/LibCore/System.h index 0a6edcbff15..850e9324e8b 100644 --- a/Libraries/LibCore/System.h +++ b/Libraries/LibCore/System.h @@ -179,4 +179,6 @@ ErrorOr get_resource_limits(int resource); ErrorOr set_resource_limits(int resource, rlim_t limit); #endif +int getpid(); + } diff --git a/Libraries/LibCore/SystemWindows.cpp b/Libraries/LibCore/SystemWindows.cpp index a9f6165192f..8fe6f69021f 100644 --- a/Libraries/LibCore/SystemWindows.cpp +++ b/Libraries/LibCore/SystemWindows.cpp @@ -184,4 +184,9 @@ ErrorOr munmap(void* address, size_t size) return {}; } +int getpid() +{ + return GetCurrentProcessId(); +} + }