better execv in cpp
This commit is contained in:
parent
5a36066325
commit
187127a646
1 changed files with 1 additions and 1 deletions
2
tpm.cc
2
tpm.cc
|
|
@ -162,7 +162,7 @@ int DaemonMain(int countdown_time) {
|
||||||
printf("%s\n", local.sun_path);
|
printf("%s\n", local.sun_path);
|
||||||
unlink(local.sun_path);
|
unlink(local.sun_path);
|
||||||
string post_hook = MakePostHookPath();
|
string post_hook = MakePostHookPath();
|
||||||
char* argv[0];
|
char* argv[] = {(char *)post_hook.c_str(), NULL};
|
||||||
if (access(post_hook.c_str(), X_OK) != -1) {
|
if (access(post_hook.c_str(), X_OK) != -1) {
|
||||||
execv(post_hook.c_str(), argv);
|
execv(post_hook.c_str(), argv);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue