loolwsd/LOOLWSD.cpp | 8 -------- loolwsd/loolstat | 11 +---------- 2 files changed, 1 insertion(+), 18 deletions(-)
New commits: commit d75bc16753d3550aff8c62b4d21fb0c395861ee7 Author: Ashod Nakashian <[email protected]> Date: Wed Apr 6 21:59:13 2016 -0400 loolwsd: removed loolwsd pid logging loolstat now uses `pgrep loolwsd$` instead of relying on pid dumping in a temp file. With the Admin Console this tool (loolstat) is less useful, so this cleanup is probably a stepping stone to removing it altogether. Change-Id: Ib7732a00c3d3ea54dffcb71e9fe1a56c4a88016e Reviewed-on: https://gerrit.libreoffice.org/23877 Reviewed-by: Ashod Nakashian <[email protected]> Tested-by: Ashod Nakashian <[email protected]> diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index adcde45..ef4775c 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -966,7 +966,6 @@ std::string LOOLWSD::FileServerRoot; int LOOLWSD::NumPreSpawnedChildren = 10; bool LOOLWSD::DoTest = false; -static const std::string pidLog = "/tmp/loolwsd.pid"; LOOLWSD::LOOLWSD() { @@ -1207,13 +1206,6 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/) if (LOOLWSD::DoTest) NumPreSpawnedChildren = 1; - // log pid information - { - FileOutputStream filePID(pidLog); - if (filePID.good()) - filePID << Process::id(); - } - const Path pipePath = Path::forDirectory(ChildRoot + Path::separator() + FIFO_PATH); if (!File(pipePath).exists() && !File(pipePath).createDirectory()) { diff --git a/loolwsd/loolstat b/loolwsd/loolstat index 57d2ba0..642c891 100755 --- a/loolwsd/loolstat +++ b/loolwsd/loolstat @@ -9,9 +9,6 @@ TOP='top' GREP='grep' PSTREE='pstree' -# log pid file -PIDLOG="/tmp/loolwsd.pid" - # print error message log_failure_msg () { if [ -n "${1:-}" ]; then @@ -54,14 +51,8 @@ if ! $TOP -v >/dev/null 2>&1; then log_failure_msg "$0: error: $TOP utility not found." fi -# checking pid log file. -if [ ! -f $PIDLOG ]; then - log_failure_msg "$0: error: $PIDLOG file not found." - exit 1; -fi - # get the loolwsd process id. -LOOLWSD_PID=$(cat $PIDLOG); +LOOLWSD_PID=`pgrep loolwsd$`; # checking if loolwsd is running. if ! $PS -p $LOOLWSD_PID > /dev/null; then _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
