Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/libosmocore/+/43102?usp=email )
Change subject: osmo_io: add osmo_iofd_flush() to transmit the pending Tx queue ......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1: Without even looking at the changes and only reading the commit description, I believe this approach is incorrect. Since you cannot anyway guarantee that all remaining data will be written synchronously, and in order to guarantee it you'd need to potentially block, this is not fesabile/appropriate.
You need to instead account for the bytes submitted to the iofd, and then calculate how many bytes are enqueued and not yet written through tracking written bytes in the write_cb. See how it's done in osmo-pcap.git ./src/osmo_pcap_wr_file.c local_iofd_write_cb()