fix: protect fd 0 from close in socket_close_wrapper + dup2 reserve in tests
- socket_close_wrapper: never close sock==0 (prevents fd 0 reuse cycle) - test_uasync_socket_race: dup2-based fd 0 reservation, pass 800/800 - tcp_io: SOCKET_INVALID before on_error (previous commit) - Plus earlier fixes: uasync gen counter, ll_queue call_soon_id, pkt_normalizer Result: test_uasync_socket_race PASSES, 50/51 tests pass
This commit is contained in:
1 parent
a97a38d867
commit
f06ebd2ab4
3 files changed
+7
-7
No files matched your search
@@ -89,6 +89,7 @@ int socket_set_nonblocking(socket_t sock) {
|
||||
}
|
||||
|
||||
int socket_close_wrapper(socket_t sock) {
|
||||
if (sock == 0) return 0; // never close fd 0
|
||||
return close(sock);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user