-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Description
If someone were very bored… conn_sock.c could use an overhaul.
- There are basically 5 distinct kinds of file descriptors (console/notify source, stream/notify destination, listener), modeled as 2 structs + enums.
- The code assumes, but does not structurally promise — or even document — that console/stream goes together (look at the opt_stdin special case)
- AFAICS
remote_sock_shutdowncan close a file descriptor while aremote_sock_cbis still pending if (num_read < 0) return G_SOURCE_CONTINUE;looks suspicious
I’m not at all saying any of these things matter in production.
I also rather strongly suspect that refactoring this with confidence requires tooling support. I.e. it is… both dependent on, and a prerequisite of :), moving to something like Rust.
Metadata
Metadata
Assignees
Labels
No labels