diff options
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig index 803ff4da..3d26d1fd 100644 --- a/src/main.zig +++ b/src/main.zig @@ -21,7 +21,15 @@ else // the thread starts, so std's 256 KiB made each 9P connection's thread cost // that much resident. A stack-overflow segfault on a thread still printed its // whole symbolized trace from 32 KiB up (16 KiB double-faulted): 64 KiB. -pub const std_options: std.Options = .{ .logFn = logFn, .signal_stack_size = 64 * 1024 }; +// +// FreeBSD answers a write to a terminal that is gone with ENXIO, an errno std +// does not expect: a Debug build traced it to stderr, that same terminal, +// and recursed until the stack ran out (a session whose ssh dropped hung). +pub const std_options: std.Options = .{ + .logFn = logFn, + .signal_stack_size = 64 * 1024, + .unexpected_error_tracing = (std.Options{}).unexpected_error_tracing and builtin.os.tag != .freebsd, +}; fn logFn( comptime level: std.log.Level, |
