Use SIGINT instead of SIGCHILD for TTY control transfer

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion
2026-04-30 14:38:56 +02:00
parent 51c5c3ee0b
commit 15cd0c4779
2 changed files with 3 additions and 3 deletions

View File

@@ -201,7 +201,7 @@ fn startSession(
// Signal to the session process to give up control on the TTY // Signal to the session process to give up control on the TTY
try log_file.info(io, "auth/sys", "releasing tty", .{}); try log_file.info(io, "auth/sys", "releasing tty", .{});
std.posix.kill(options.session_pid, std.posix.SIG.CHLD) catch return error.TtyControlTransferFailed; std.posix.kill(options.session_pid, std.posix.SIG.INT) catch return error.TtyControlTransferFailed;
// Execute what the user requested // Execute what the user requested
switch (current_environment.display_server) { switch (current_environment.display_server) {

View File

@@ -1541,9 +1541,9 @@ fn authenticate(ptr: *anyopaque) !bool {
const tty_control_transfer_act = std.posix.Sigaction{ const tty_control_transfer_act = std.posix.Sigaction{
.handler = .{ .handler = &ttyControlTransferSignalHandler }, .handler = .{ .handler = &ttyControlTransferSignalHandler },
.mask = std.posix.sigemptyset(), .mask = std.posix.sigemptyset(),
.flags = std.posix.SA.RESTART, // For waitpid() .flags = 0,
}; };
std.posix.sigaction(std.posix.SIG.CHLD, &tty_control_transfer_act, null); std.posix.sigaction(std.posix.SIG.INT, &tty_control_transfer_act, null);
try state.log_file.reinit(state.io); try state.log_file.reinit(state.io);