mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
termio: set crash threadlocal data for exec reader thread
This commit is contained in:
@ -12,6 +12,7 @@ const posix = std.posix;
|
|||||||
const xev = @import("xev");
|
const xev = @import("xev");
|
||||||
const build_config = @import("../build_config.zig");
|
const build_config = @import("../build_config.zig");
|
||||||
const configpkg = @import("../config.zig");
|
const configpkg = @import("../config.zig");
|
||||||
|
const crash = @import("../crash/main.zig");
|
||||||
const fastmem = @import("../fastmem.zig");
|
const fastmem = @import("../fastmem.zig");
|
||||||
const internal_os = @import("../os/main.zig");
|
const internal_os = @import("../os/main.zig");
|
||||||
const renderer = @import("../renderer.zig");
|
const renderer = @import("../renderer.zig");
|
||||||
@ -1184,6 +1185,13 @@ pub const ReadThread = struct {
|
|||||||
// Always close our end of the pipe when we exit.
|
// Always close our end of the pipe when we exit.
|
||||||
defer posix.close(quit);
|
defer posix.close(quit);
|
||||||
|
|
||||||
|
// Setup our crash metadata
|
||||||
|
crash.sentry.thread_state = .{
|
||||||
|
.type = .io,
|
||||||
|
.surface = io.surface_mailbox.surface,
|
||||||
|
};
|
||||||
|
defer crash.sentry.thread_state = null;
|
||||||
|
|
||||||
// First thing, we want to set the fd to non-blocking. We do this
|
// First thing, we want to set the fd to non-blocking. We do this
|
||||||
// so that we can try to read from the fd in a tight loop and only
|
// so that we can try to read from the fd in a tight loop and only
|
||||||
// check the quit fd occasionally.
|
// check the quit fd occasionally.
|
||||||
@ -1265,6 +1273,13 @@ pub const ReadThread = struct {
|
|||||||
// Always close our end of the pipe when we exit.
|
// Always close our end of the pipe when we exit.
|
||||||
defer posix.close(quit);
|
defer posix.close(quit);
|
||||||
|
|
||||||
|
// Setup our crash metadata
|
||||||
|
crash.sentry.thread_state = .{
|
||||||
|
.type = .io,
|
||||||
|
.surface = io.surface_mailbox.surface,
|
||||||
|
};
|
||||||
|
defer crash.sentry.thread_state = null;
|
||||||
|
|
||||||
var buf: [1024]u8 = undefined;
|
var buf: [1024]u8 = undefined;
|
||||||
while (true) {
|
while (true) {
|
||||||
while (true) {
|
while (true) {
|
||||||
|
Reference in New Issue
Block a user