mirror of
https://github.com/fairyglade/ly.git
synced 2025-12-20 19:24:53 +00:00
Don't shutdown termbox2 if authentication fails
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -20,6 +20,7 @@ pub const AuthOptions = struct {
|
||||
setup_cmd: []const u8,
|
||||
login_cmd: ?[]const u8,
|
||||
x_cmd: []const u8,
|
||||
session_pid: std.posix.pid_t,
|
||||
};
|
||||
|
||||
var xorg_pid: std.posix.pid_t = 0;
|
||||
@@ -164,6 +165,9 @@ fn startSession(
|
||||
// Change to the user's home directory
|
||||
std.posix.chdirZ(pwd.pw_dir.?) catch return error.ChangeDirectoryFailed;
|
||||
|
||||
// Signal to the session process to give up control on the TTY
|
||||
_ = std.posix.kill(options.session_pid, std.posix.SIG.CHLD) catch return error.TtyControlTransferFailed;
|
||||
|
||||
// Execute what the user requested
|
||||
switch (current_environment.display_server) {
|
||||
.wayland => try executeWaylandCmd(pwd.pw_shell.?, options, current_environment.cmd),
|
||||
|
||||
Reference in New Issue
Block a user