mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibDesktop: Collapse if-else in AppFile
This commit is contained in:
parent
c7e72a52a3
commit
0ec39aafb6
Notes:
sideshowbarker
2024-07-18 07:29:43 +09:00
Author: https://github.com/gmta
Commit: 0ec39aafb6
Pull-request: https://github.com/SerenityOS/serenity/pull/9203
Reviewed-by: https://github.com/linusg
1 changed files with 3 additions and 5 deletions
|
@ -124,11 +124,9 @@ bool AppFile::spawn() const
|
||||||
if ((errno = posix_spawn(&child_pid, executable().characters(), nullptr, nullptr, const_cast<char**>(argv), environ))) {
|
if ((errno = posix_spawn(&child_pid, executable().characters(), nullptr, nullptr, const_cast<char**>(argv), environ))) {
|
||||||
perror("posix_spawn");
|
perror("posix_spawn");
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else if (disown(child_pid) < 0) {
|
||||||
if (disown(child_pid) < 0) {
|
perror("disown");
|
||||||
perror("disown");
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue