summaryrefslogtreecommitdiffstats
path: root/storageserver
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahoo-inc.com>2016-07-05 13:03:43 +0200
committerArne H Juul <arnej@yahoo-inc.com>2016-07-05 13:03:49 +0200
commit9636d119ef9cd0f000c77164a44468beb141b14e (patch)
treee2782beebc3af3237ee0494a8acb79eb936ddd6b /storageserver
parent983dd5714698d929a14a124cc1de3e4039a7ef0c (diff)
less spurious warnings at shutdown
* the storageserver didn't like getting the TERM signal both from runserver (via killpg) and sentinel, so it would print a warning to stderr. But the warning didn't end with a newline. * the line-splitter used by config-sentinel didn't handle input that didn't end with newline before EOF well, so the warning was never handled and sent to the vespa.log file earlier. * only print warning if too many signals seen (> 2), and end it with a newline. * don't ignore last byte of input if we can avoid it.
Diffstat (limited to 'storageserver')
-rw-r--r--storageserver/src/apps/storaged/storage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/storageserver/src/apps/storaged/storage.cpp b/storageserver/src/apps/storaged/storage.cpp
index 8eb955ae930..1d84a73d1ed 100644
--- a/storageserver/src/apps/storaged/storage.cpp
+++ b/storageserver/src/apps/storaged/storage.cpp
@@ -129,9 +129,9 @@ namespace {
if (sigtramp == 0) _exit(EXIT_FAILURE);
// note: this is not totally safe, sigtramp is not protected by a lock
sigtramp->handleSignal(sig);
- } else {
+ } else if (_G_signalCount > 2) {
fprintf(stderr, "Received another shutdown signal %u while "
- "shutdown in progress (count=%u)",
+ "shutdown in progress (count=%u)\n",
sig, _G_signalCount);
}
}