mirror of https://github.com/aria2/aria2
Use execlp() instead of execl()
parent
df52a3a955
commit
f6c7aaa1cd
12
src/util.cc
12
src/util.cc
|
@ -1514,12 +1514,12 @@ void executeHook
|
||||||
if(cpid == -1) {
|
if(cpid == -1) {
|
||||||
A2_LOG_ERROR("fork() failed. Cannot execute user command.");
|
A2_LOG_ERROR("fork() failed. Cannot execute user command.");
|
||||||
} else if(cpid == 0) {
|
} else if(cpid == 0) {
|
||||||
execl(command.c_str(),
|
execlp(command.c_str(),
|
||||||
command.c_str(),
|
command.c_str(),
|
||||||
gidStr.c_str(),
|
gidStr.c_str(),
|
||||||
numFilesStr.c_str(),
|
numFilesStr.c_str(),
|
||||||
firstFilename.c_str(),
|
firstFilename.c_str(),
|
||||||
reinterpret_cast<char*>(0));
|
reinterpret_cast<char*>(0));
|
||||||
perror(("Could not execute user command: "+command).c_str());
|
perror(("Could not execute user command: "+command).c_str());
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue