mirror of
https://github.com/fairyglade/ly.git
synced 2026-05-06 07:10:36 +00:00
Use SIGINT instead of SIGCHILD for TTY control transfer
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -201,7 +201,7 @@ fn startSession(
|
||||
|
||||
// Signal to the session process to give up control on the 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
|
||||
switch (current_environment.display_server) {
|
||||
|
||||
@@ -1541,9 +1541,9 @@ fn authenticate(ptr: *anyopaque) !bool {
|
||||
const tty_control_transfer_act = std.posix.Sigaction{
|
||||
.handler = .{ .handler = &ttyControlTransferSignalHandler },
|
||||
.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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user