You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Schedulers, CI and wrapper scripts branch on exit codes. Container orchestrators send SIGTERM, and on Windows Go maps console close, logoff and shutdown to SIGTERM too. Getting 130 there, along with a "Ctrl+C again to force quit" hint, is wrong, and multi-target runs can't tell partial failure from total failure.
Evidence
main.go:474-485,532-535: SIGTERM is handled like SIGINT and returns 130 instead of 143.
Exit codes are inconsistent and undocumented:
A flag parse error returns 2 (main.go:367).
Semantic usage errors (missing domain, bad -format) return 1.
README documents only 130 (README.md:319).
-dL semantics are undocumented (verified at main.go:494-540):
A failed target doesn't stop the rest, and the run exits 1 at the end.
-max-queries, -rate and the reliability guard apply per target.
A reliability abort caused by an overloaded resolver still moves on and hits the same resolver for every remaining target.
JSON output has no per-target status record.
Suggested approach
Return 128+signum: 130 for SIGINT, 143 for SIGTERM. Only print the force-quit hint for interactive interrupts.
Use 2 for every usage error.
Consider a distinct code for partial -dL failure, e.g. 3.
Document the table (0/1/2/3/130/143) in README and -h.
Document the per-target scope of -max-queries, -rate and the guard.
Stop remaining targets after a reliability abort, unless -no-abort is set.
Activity