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
commit84a29dd4980d5b39615e453f289bd1a81213296d (patch)
tree5e320f10d6b5863e0d5ab1a8caa9eefbdaa5195f /util/system
parent1717072c6635948128dad7b015a0ec05acbe913b (diff)
downloadydb-84a29dd4980d5b39615e453f289bd1a81213296d.tar.gz
Restoring authorship annotation for <onpopov@yandex-team.ru>. Commit 1 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 b9615f0dfa..fc4f2e7427 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 60e243266f..906d21f3ed 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 e7122a2971..149e7f2082 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);
+}