glibc/stdio-common
Florian Weimer 4fa959d13d stdio-common: In tst-setvbuf2, close helper thread descriptor only if opened
The helper thread may get canceled before the open system
call succeds.  Then ThreadData.fd remains zero, and eventually
the xclose call in end_reader_thread fails because descriptor 0
is not open.

Instead, initialize the fd member to -1 (not a valid descriptor)
and close the descriptor only if valid.  Do this in a new end_thread
helper routine.

Also add more error checking to close operations.

Fixes commit 95b780c1d0549678c0a244c6e2112ec97edf0839 ("stdio: Add
more setvbuf tests").
2025-04-08 10:39:44 +02:00
..
2024-12-22 17:29:28 +08:00
2023-06-13 19:59:08 -04:00
2023-06-13 19:59:08 -04:00
2024-12-22 17:29:28 +08:00
2023-06-01 13:01:32 -04:00
2023-06-13 19:59:08 -04:00
2021-09-03 22:06:44 +05:30
2023-06-01 13:01:32 -04:00
2023-05-18 12:34:00 -04:00
2023-05-18 12:34:00 -04:00
2023-05-18 12:34:00 -04:00
2025-04-02 19:41:32 -04:00
2023-06-13 19:59:08 -04:00
2025-01-28 12:50:50 -05:00
2023-10-30 13:03:59 -03:00