Improve the error handling in passive TFO test to check the return value from sendto(), and to fail if read() or fprintf() failed.
You propose to adjust error detection and corresponding exception handling another bit. How do you think about to take also another look if further function implementations would be similarly affected?
Regards, Markus