termio: writer abstraction

This commit is contained in:
Mitchell Hashimoto
2024-07-14 14:48:48 -07:00
parent 31144da845
commit af7adedb50
8 changed files with 252 additions and 205 deletions

View File

@@ -308,13 +308,13 @@ fn processExit(
// Notify our main writer thread which has access to more
// information so it can show a better error message.
_ = td.writer_mailbox.push(.{
td.writer.send(.{
.child_exited_abnormally = .{
.exit_code = exit_code,
.runtime_ms = runtime,
},
}, .{ .forever = {} });
td.writer_wakeup.notify() catch break :runtime;
}, null);
td.writer.notify();
return .disarm;
}