aboutsummaryrefslogtreecommitdiff
path: root/src/os/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/env.c')
-rw-r--r--src/os/env.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/os/env.c b/src/os/env.c
index 9415b19573..034a4ff3a0 100644
--- a/src/os/env.c
+++ b/src/os/env.c
@@ -50,3 +50,13 @@ char *os_getenvname_at_index(size_t index)
# endif
}
+
+long os_get_pid()
+{
+#ifdef _WIN32
+ return (long)GetCurrentProcessId();
+#else
+ return (long)getpid();
+#endif
+}
+