aboutsummaryrefslogtreecommitdiffstats
path: root/util/system
diff options
context:
space:
mode:
authoronpopov <onpopov@yandex-team.ru>2022-02-10 16:50:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:38 +0300
commit8773f7661194d4c0bdb1e3937b2ff7ae01dd13f8 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/system
parent84a29dd4980d5b39615e453f289bd1a81213296d (diff)
downloadydb-8773f7661194d4c0bdb1e3937b2ff7ae01dd13f8.tar.gz
Restoring authorship annotation for <onpopov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system')
-rw-r--r--util/system/getpid.cpp20
-rw-r--r--util/system/getpid.h6
-rw-r--r--util/system/getpid_ut.cpp34
3 files changed, 30 insertions, 30 deletions
diff --git a/util/system/getpid.cpp b/util/system/getpid.cpp
index fc4f2e7427..b9615f0dfa 100644
--- a/util/system/getpid.cpp
+++ b/util/system/getpid.cpp
@@ -1,6 +1,6 @@
-#include "getpid.h"
-
-#ifdef _win_
+#include "getpid.h"
+
+#ifdef _win_
// The include file should be Windows.h for Windows <=7, Processthreadsapi.h for Windows >=8 and Server 2012,
// see http://msdn.microsoft.com/en-us/library/windows/desktop/ms683180%28v=vs.85%29.aspx
// The way to determine windows version is described in http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx
@@ -13,11 +13,11 @@
#include <sys/types.h>
#include <unistd.h>
#endif
-
+
TProcessId GetPID() {
-#ifdef _win_
- return GetCurrentProcessId();
-#else
- return getpid();
-#endif
-}
+#ifdef _win_
+ return GetCurrentProcessId();
+#else
+ return getpid();
+#endif
+}
diff --git a/util/system/getpid.h b/util/system/getpid.h
index 906d21f3ed..60e243266f 100644
--- a/util/system/getpid.h
+++ b/util/system/getpid.h
@@ -1,8 +1,8 @@
-#pragma once
-
+#pragma once
+
#include "platform.h"
#include "types.h"
-
+
#if defined(_win_)
using TProcessId = ui32; // DWORD
#else
diff --git a/util/system/getpid_ut.cpp b/util/system/getpid_ut.cpp
index 149e7f2082..e7122a2971 100644
--- a/util/system/getpid_ut.cpp
+++ b/util/system/getpid_ut.cpp
@@ -1,19 +1,19 @@
-#include "getpid.h"
-
+#include "getpid.h"
+
#include <library/cpp/testing/unittest/registar.h>
-
-class TGetPidTest: public TTestBase {
- UNIT_TEST_SUITE(TGetPidTest);
- UNIT_TEST(Test);
- UNIT_TEST_SUITE_END();
-
-public:
- void Test();
-};
-
-UNIT_TEST_SUITE_REGISTRATION(TGetPidTest);
-
-void TGetPidTest::Test() {
+
+class TGetPidTest: public TTestBase {
+ UNIT_TEST_SUITE(TGetPidTest);
+ UNIT_TEST(Test);
+ UNIT_TEST_SUITE_END();
+
+public:
+ void Test();
+};
+
+UNIT_TEST_SUITE_REGISTRATION(TGetPidTest);
+
+void TGetPidTest::Test() {
const TProcessId pid = GetPID();
- UNIT_ASSERT(pid != 0);
-}
+ UNIT_ASSERT(pid != 0);
+}