mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-26 23:44:19 +02:00
Don't shutdown termbox2 if authentication fails
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
6cb102257c
commit
9168266cca
2 changed files with 20 additions and 2 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue