pty: use libc ioctl for compat

This commit is contained in:
Mitchell Hashimoto
2022-04-26 14:20:17 -07:00
parent cf40a33fdd
commit c565a889f9

View File

@ -83,7 +83,7 @@ pub fn childPreExec(self: Pty) !void {
if (setsid() < 0) return error.ProcessGroupFailed; if (setsid() < 0) return error.ProcessGroupFailed;
// Set controlling terminal // Set controlling terminal
if (std.os.linux.ioctl(self.slave, c.TIOCSCTTY, 0) < 0) if (std.c.ioctl(self.slave, c.TIOCSCTTY, @as(c_ulong, 0)) < 0)
return error.SetControllingTerminalFailed; return error.SetControllingTerminalFailed;
// Can close master/slave pair now // Can close master/slave pair now