Change in ...osmo-trx[master]: osmo-trx: log to stderr on signal received

laforge gerrit-no-reply at lists.osmocom.org
Mon Aug 19 21:25:39 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-trx/+/15210 )

Change subject: osmo-trx: log to stderr on signal received
......................................................................

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
---
M Transceiver52M/osmo-trx.cpp
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



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 @@
 		   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:

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15210
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I70ba86919d1f7df41ef3db4916317d27697a025c
Gerrit-Change-Number: 15210
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190819/2fc76603/attachment.html>


More information about the gerrit-log mailing list