Change in osmo-bts[master]: main: do not use fprintf to log fatal errors

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Jun 17 11:28:04 UTC 2021


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/24707 )

Change subject: main: do not use fprintf to log fatal errors
......................................................................


Patch Set 1:

(3 comments)

https://gerrit.osmocom.org/c/osmo-bts/+/24707/1/src/common/main.c 
File src/common/main.c:

https://gerrit.osmocom.org/c/osmo-bts/+/24707/1/src/common/main.c@95 
PS1, Line 95: 			LOGP(DLGLOBAL, LOGL_FATAL, "%s: Unknown VTY reference generation "
You shouldn't use libosmocore logging system here, because you are still configuring it from cmd line arguments in the loop under handle_options, so the program may end up doing unexpected stuff.


https://gerrit.osmocom.org/c/osmo-bts/+/24707/1/src/common/main.c@306 
PS1, Line 306: 		LOGP(DLGLOBAL, LOGL_FATAL, "Failed to create BTS structure\n");
I'm not sure whether it's a 100% good idea to merge this patch, specially since we introduced support for async writes in the logging subsystem. That means the writes may not happen until the main loop is run, which in all these changes you do here is not, since we exit beforehand. As a result, messages could potentially be held in write queues.
On the other side, we win potentially writing those to eg. file targets, since it should be rare delaying writes for those messages since they are not that big.


https://gerrit.osmocom.org/c/osmo-bts/+/24707/1/src/common/main.c@420 
PS1, Line 420: 			perror("Error during daemonize");
If all lines are changed, this perror() line should too.



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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2ae4acf6a92137236e1b62c2d0aab79a34134f45
Gerrit-Change-Number: 24707
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Thu, 17 Jun 2021 11:28:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210617/0e554d11/attachment.htm>


More information about the gerrit-log mailing list