You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-11-06 08:49:29 +02:00
Added trim() to process id read from lock file.
The prior way worked fine but added extraneous linefeeds to the log output.
This commit is contained in:
@@ -15,6 +15,7 @@ use File::Basename qw(dirname);
|
||||
use lib dirname($0) . '/../lib';
|
||||
use pgBackRest::Common::Exception;
|
||||
use pgBackRest::Common::Log;
|
||||
use pgBackRest::Common::String;
|
||||
use pgBackRest::Config::Config;
|
||||
use pgBackRest::FileCommon;
|
||||
|
||||
@@ -275,7 +276,7 @@ sub lockStop
|
||||
}
|
||||
|
||||
# The file is locked so that means there is a running process - read the process id and send it a term signal
|
||||
my $iProcessId = readline($hLockHandle);
|
||||
my $iProcessId = trim(readline($hLockHandle));
|
||||
|
||||
# If the process id is defined then this is a valid lock file
|
||||
if (defined($iProcessId))
|
||||
|
||||
@@ -107,7 +107,6 @@ run 002 - rmt 0, cmp 0, arc_async 1
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: stop start: --config=[TEST_PATH]/db/pgbackrest.conf --force --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --repo-path=[TEST_PATH]/backrest
|
||||
INFO: sent term signal to process [PROCESS-ID]
|
||||
|
||||
DEBUG: Exit::exitSafe(): iExitCode = 0, strSignal = [undef]
|
||||
INFO: stop stop
|
||||
DEBUG: Common:::Lock::lockRelease(): bFailOnNoLock = false
|
||||
|
||||
@@ -101,7 +101,6 @@ run 006 - rmt 1, cmp 0, arc_async 1
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: stop start: --config=[TEST_PATH]/db/pgbackrest.conf --force --lock-path=[TEST_PATH]/local/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/local/log --repo-path=[TEST_PATH]/backrest
|
||||
INFO: sent term signal to process [PROCESS-ID]
|
||||
|
||||
DEBUG: Exit::exitSafe(): iExitCode = 0, strSignal = [undef]
|
||||
INFO: stop stop
|
||||
DEBUG: Common:::Lock::lockRelease(): bFailOnNoLock = false
|
||||
|
||||
@@ -224,7 +224,6 @@ db-version="9.3"
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: stop start: --config=[TEST_PATH]/db/pgbackrest.conf --force --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --repo-path=[TEST_PATH]/backrest
|
||||
INFO: sent term signal to process [PROCESS-ID]
|
||||
|
||||
DEBUG: Exit::exitSafe(): iExitCode = 0, strSignal = [undef]
|
||||
INFO: stop stop
|
||||
DEBUG: Common:::Lock::lockRelease(): bFailOnNoLock = false
|
||||
|
||||
@@ -285,7 +285,6 @@ full backup (protocol timeout)
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: stop start: --config=[TEST_PATH]/db/pgbackrest.conf --force --lock-path=[TEST_PATH]/local/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/local/log --repo-path=[TEST_PATH]/backrest
|
||||
INFO: sent term signal to process [PROCESS-ID]
|
||||
|
||||
DEBUG: Exit::exitSafe(): iExitCode = 0, strSignal = [undef]
|
||||
INFO: stop stop
|
||||
DEBUG: Common:::Lock::lockRelease(): bFailOnNoLock = false
|
||||
@@ -425,7 +424,6 @@ start (local)
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: stop start: --config=[TEST_PATH]/backrest/pgbackrest.conf --force --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --repo-path=[TEST_PATH]/backrest
|
||||
INFO: sent term signal to process [PROCESS-ID]
|
||||
|
||||
DEBUG: Exit::exitSafe(): iExitCode = 0, strSignal = [undef]
|
||||
INFO: stop stop
|
||||
DEBUG: Common:::Lock::lockRelease(): bFailOnNoLock = false
|
||||
|
||||
Reference in New Issue
Block a user