Merge pull request #12 from thp/argv0-full-path

[mapplauncherd] Add full path to argv[0] of invoked process
pull/1/head
Thomas Perl 12 years ago
commit 925b07a306

@ -745,6 +745,10 @@ int main(int argc, char *argv[])
prog_name = search_program(argv[optind]); prog_name = search_program(argv[optind]);
prog_argc = argc - optind; prog_argc = argc - optind;
prog_argv = &argv[optind]; prog_argv = &argv[optind];
// Force argv[0] of application to be the absolute path to allow the
// application to find out its installation directory from there
prog_argv[0] = prog_name;
} }
// Check if application name isn't defined // Check if application name isn't defined

Loading…
Cancel
Save