[Libreoffice-commits] online.git: common/Log.cpp common/SigUtil.cpp common/Util.cpp
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 7 11:25:10 UTC 2019
common/Log.cpp | 2 +-
common/SigUtil.cpp | 6 +++---
common/Util.cpp | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 189cd0e3891f9aeb93bc4314209032c89a746eff
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Thu Nov 7 11:53:37 2019 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Nov 7 12:24:53 2019 +0100
killpoco: Get rid of Poco::Process:id() usage.
Change-Id: If060767389f9fa57deba1ceefc872bac03763498
Reviewed-on: https://gerrit.libreoffice.org/82208
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/common/Log.cpp b/common/Log.cpp
index bb9ba9d39..e08287bb9 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -158,7 +158,7 @@ namespace Log
oss << Source.getName();
#if !MOBILEAPP // Just one process in a mobile app, the pid is uninteresting.
oss << '-'
- << std::setw(5) << std::setfill('0') << Poco::Process::id();
+ << std::setw(5) << std::setfill('0') << getpid();
#endif
Source.setId(oss.str());
diff --git a/common/SigUtil.cpp b/common/SigUtil.cpp
index 212d1382f..4003d8d73 100644
--- a/common/SigUtil.cpp
+++ b/common/SigUtil.cpp
@@ -236,7 +236,7 @@ namespace SigUtil
dumpBacktrace();
// let default handler process the signal
- kill(Poco::Process::id(), signal);
+ kill(getpid(), signal);
}
void dumpBacktrace()
@@ -298,9 +298,9 @@ namespace SigUtil
// prepare this in advance just in case.
std::ostringstream stream;
stream << "\nFatal signal! Attach debugger with:\n"
- << "sudo gdb --pid=" << Poco::Process::id() << "\n or \n"
+ << "sudo gdb --pid=" << getpid() << "\n or \n"
<< "sudo gdb --q --n --ex 'thread apply all backtrace full' --batch --pid="
- << Poco::Process::id() << "\n";
+ << getpid() << "\n";
std::string streamStr = stream.str();
assert (sizeof (FatalGdbString) > strlen(streamStr.c_str()) + 1);
strncpy(FatalGdbString, streamStr.c_str(), sizeof(FatalGdbString)-1);
diff --git a/common/Util.cpp b/common/Util.cpp
index b493afeca..a589785d4 100644
--- a/common/Util.cpp
+++ b/common/Util.cpp
@@ -608,7 +608,7 @@ namespace Util
std::string UniqueId()
{
static std::atomic_int counter(0);
- return std::to_string(Poco::Process::id()) + '/' + std::to_string(counter++);
+ return std::to_string(getpid()) + '/' + std::to_string(counter++);
}
std::map<std::string, std::string> JsonToMap(const std::string& jsonString)
More information about the Libreoffice-commits
mailing list