mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-27 01:41:45 +02:00
Run executables from PATH instead of /usr/bin
Not all distributions install non-system binaries into /usr/bin. For example, NixOS installs packages to /nix/store using a unique hash generated from the inputs used to build it: /nix/store/jld7jh3ilvbg91zvn1bdyawfc55b9jk8-polkit-0.118-bin/bin/pkexec
This commit is contained in:

committed by
afayaz-feral

parent
4000a32584
commit
126e67fb6b
@ -140,7 +140,7 @@ int run_external_process(const char *const *exec_args, char buffer[EXTERNAL_BUFF
|
||||
* bindings that these objects are completely constant.
|
||||
* http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html
|
||||
*/
|
||||
if (execv(exec_args[0], (char *const *)exec_args) != 0) {
|
||||
if (execvp(exec_args[0], (char *const *)exec_args) != 0) {
|
||||
LOG_ERROR("Failed to execute external process: %s %s\n", exec_args[0], strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user