aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-08-14 16:26:45 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-08-14 16:26:47 +0200
commit3eed8ebb0d91c18c8bf81db4df25d77cc7b1b544 (patch)
tree68e6b9a4da24f4bf702b23783a6e397aa217fd10
parentd0cbb16a9391ea6ffb185acff3cd3f765bf48284 (diff)
osmo-trx: log to stderr on signal received
Since osmo-trx it's a big multithreaded process and shutdown sequence can be complex, better use stderr to log signal received events to make sure log is outputted straigh away and not buffered. In general stdout is usually line-buffered, but buffering strategy can be more conservative if output is for instance redirected to a file. Change-Id: I70ba86919d1f7df41ef3db4916317d27697a025c
-rw-r--r--Transceiver52M/osmo-trx.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 15f744c..ab0b631 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -173,11 +173,11 @@ static void sig_handler(int signo)
action like printing */
return;
- fprintf(stdout, "signal %d received\n", signo);
+ fprintf(stderr, "signal %d received\n", signo);
switch (signo) {
case SIGINT:
case SIGTERM:
- fprintf(stdout, "shutting down\n");
+ fprintf(stderr, "shutting down\n");
gshutdown = true;
break;
case SIGABRT: