nx_sigpipe_gate.nx
buildroot/runtime/nx_sigpipe_gate.nx
about
nx_sigpipe_gate.nx -- proves the SIGPIPE root fix, and proves the tooth can
SEE the disease it cures (debt seq1261/seq1126 family).
THE FLAW: a process that writes to a peer which has closed its end takes
SIGPIPE's default action -- TERMINATE. For a daemon that is an outage with
no diagnosis: it dies holding a healthy listening socket, the supervisor
reports a crash-loop, and the request that triggered it looks failed even
when the work completed. Every long-running server in the tree ran this way
(a tree-wide grep for SIGPIPE handling returned NOTHING before this gate).
THE PAIR (why this gate is not vacuous): T1 forks a child that does NOT
install the ignore and confirms the kernel KILLS it with signal 13 -- if
this ever goes green-by-accident the tooth has stopped measuring anything.
T2 forks a child that DOES install it and confirms the same write instead
returns -EPIPE and the child exits 0. One tooth shows the disease, the
other shows the cure, and neither can pass for the other's reason.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_http_server.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 21 | const SG_EPIPE: i64 = 0 - 32 // -errno the kernel returns once SIGPIPE is ignored |
| 22 | const SG_SIGPIPE: i64 = 13 // signal number (also the rt_sigaction syscall nr) |
| 23 | const SG_CHILD_OK: i64 = 0 // child exit when it saw EPIPE and survived |
| 24 | const SG_CHILD_WRONGRC: i64 = 7 // child survived but the write rc was not -EPIPE |
functions
| 28 | func sg_probe(ignore: i64) -> i64 |
| 52 | func main() -> i64 |