Change in libosmocore[master]: osmo_select_shutdown_request(): allow finishing pending writes on SIG...

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/.

neels gerrit-no-reply at lists.osmocom.org
Fri Jun 18 09:48:10 UTC 2021


neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/24544 )

Change subject: osmo_select_shutdown_request(): allow finishing pending writes on SIGTERM
......................................................................


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/24544/3/src/select.c 
File src/select.c:

https://gerrit.osmocom.org/c/libosmocore/+/24544/3/src/select.c@387 
PS3, Line 387: 	if (!_osmo_select_shutdown_requested)
> I'd also say it's an over-optimization. […]
There should be no behavior at all. The shutdown loop should only dispatch already pending messages.
If we still let timers take actions, timeouts may dispatch more messages.
In the extreme case that would be an endless loop and the application would never quit.

IOW, we are shutting down, *nothing* should happen any more, just get the outbound packets sent and done.

If we consider the other case: let the timers run. Maybe one or two timers still get the chance to do their action, but once there is no pending write in one select loop, the application quits. So no timer can rely on getting its turn anymore, anyway. It makes no sense to use timers during shutdown.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib94d4316924103459577087c2214188679db2227
Gerrit-Change-Number: 24544
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge at osmocom.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Fri, 18 Jun 2021 09:48:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge at osmocom.org>
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210618/d6390ac5/attachment.htm>


More information about the gerrit-log mailing list