diff --git a/src/renderer/OpenGL.zig b/src/renderer/OpenGL.zig index eb114ea33..35f0228c2 100644 --- a/src/renderer/OpenGL.zig +++ b/src/renderer/OpenGL.zig @@ -431,10 +431,7 @@ pub fn threadEnter(self: *const OpenGL, window: glfw.Window) !void { // Load OpenGL bindings. This API is context-aware so this sets // a threadlocal context for these pointers. - const version = try gl.glad.load(switch (builtin.zig_backend) { - .stage1 => glfw.getProcAddress, - else => &glfw.getProcAddress, - }); + const version = try gl.glad.load(&glfw.getProcAddress); errdefer gl.glad.unload(); log.info("loaded OpenGL {}.{}", .{ gl.glad.versionMajor(@intCast(c_uint, version)), diff --git a/src/termio/Exec.zig b/src/termio/Exec.zig index cb7b8f6e6..1909d2025 100644 --- a/src/termio/Exec.zig +++ b/src/termio/Exec.zig @@ -91,6 +91,9 @@ pub fn init(alloc: Allocator, opts: termio.Options) !Exec { .args = &[_][]const u8{path}, .env = &env, .cwd = opts.config.@"working-directory", + .stdin = .{ .handle = pty.slave }, + .stdout = .{ .handle = pty.slave }, + .stderr = .{ .handle = pty.slave }, .pre_exec = (struct { fn callback(cmd: *Command) void { const p = cmd.getData(Pty) orelse unreachable; @@ -100,11 +103,6 @@ pub fn init(alloc: Allocator, opts: termio.Options) !Exec { }).callback, .data = &pty, }; - // note: can't set these in the struct initializer because it - // sets the handle to "0". Probably a stage1 zig bug. - cmd.stdin = std.fs.File{ .handle = pty.slave }; - cmd.stdout = cmd.stdin; - cmd.stderr = cmd.stdin; try cmd.start(alloc); log.info("started subcommand path={s} pid={?}", .{ path, cmd.pid });