Page MenuHomeFreeBSD

libfetch: Fail hard if interrupted while connecting
ClosedPublic

Authored by des on Feb 20 2026, 7:14 PM.
Tags
None
Referenced Files
F153001635: D55406.id172355.diff
Sat, Apr 18, 1:55 PM
Unknown Object (File)
Fri, Apr 17, 11:20 PM
Unknown Object (File)
Sun, Apr 12, 12:32 AM
Unknown Object (File)
Thu, Apr 9, 2:07 PM
Unknown Object (File)
Tue, Apr 7, 5:35 PM
Unknown Object (File)
Mon, Apr 6, 9:09 PM
Unknown Object (File)
Sun, Apr 5, 8:42 PM
Unknown Object (File)
Mon, Mar 30, 2:37 AM
Subscribers

Details

Summary

This fixes an issue where the first address that DNS returns is blocked
by a packet filter, so we hang for a while, then the user hits Ctrl-C,
interrupting connect(2), whereupon we move on to the next address, get
a connection, request the file, and return to fetch(1), which sees that
SIGINT was caught and bails.

Note that we make no attempt to enforce fetchTimeout in the connection
phase, and never have. It's feasible, but non-trivial, so we'll leave
it as an exercise for future us.

PR: 293312
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable