Taskbar: Pass full argv for exit action
We need to pass --now to `shutdown` command.
This commit is contained in:
parent
f770b9d430
commit
0a7041aad7
Notes:
sideshowbarker
2024-07-18 07:21:25 +09:00
Author: https://github.com/luk1337 Commit: https://github.com/SerenityOS/serenity/commit/0a7041aad7f Pull-request: https://github.com/SerenityOS/serenity/pull/9249
1 changed files with 7 additions and 1 deletions
|
@ -273,7 +273,13 @@ NonnullRefPtr<GUI::Menu> build_system_menu()
|
|||
if (command.size() == 0)
|
||||
return;
|
||||
|
||||
Core::Process::spawn(command[0]);
|
||||
pid_t child_pid;
|
||||
if ((errno = posix_spawn(&child_pid, command[0], nullptr, nullptr, const_cast<char**>(command.data()), environ))) {
|
||||
perror("posix_spawn");
|
||||
} else {
|
||||
if (disown(child_pid) < 0)
|
||||
perror("disown");
|
||||
}
|
||||
}));
|
||||
|
||||
return system_menu;
|
||||
|
|
Loading…
Add table
Reference in a new issue