mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LoginServer: Correctly retrieve SystemServer's exit code
The returned value of `waitpid` is the PID of the process and not the exit code.
This commit is contained in:
parent
8266ebf3c6
commit
cc0d53d6a6
Notes:
sideshowbarker
2024-07-17 08:46:47 +09:00
Author: https://github.com/LucasChollet
Commit: cc0d53d6a6
Pull-request: https://github.com/SerenityOS/serenity/pull/14608
Issue: https://github.com/SerenityOS/serenity/issues/13443
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
1 changed files with 2 additions and 2 deletions
|
@ -46,8 +46,8 @@ static void login(Core::Account const& account, LoginWindow& window)
|
||||||
pid_t rc = waitpid(pid, &wstatus, 0);
|
pid_t rc = waitpid(pid, &wstatus, 0);
|
||||||
if (rc == -1)
|
if (rc == -1)
|
||||||
dbgln("waitpid failed: {}", strerror(errno));
|
dbgln("waitpid failed: {}", strerror(errno));
|
||||||
if (rc != 0)
|
if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) != 0)
|
||||||
dbgln("SystemServer exited with non-zero status: {}", rc);
|
dbgln("SystemServer exited with non-zero status: {}", WEXITSTATUS(wstatus));
|
||||||
|
|
||||||
window.show();
|
window.show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue