From f6c7aaa1cdfc940c1cbc5455c246e4752b5b2aa4 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 7 Sep 2012 01:28:53 +0900 Subject: [PATCH] Use execlp() instead of execl() --- src/util.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util.cc b/src/util.cc index e5686a14..553f3aa3 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1514,12 +1514,12 @@ void executeHook if(cpid == -1) { A2_LOG_ERROR("fork() failed. Cannot execute user command."); } else if(cpid == 0) { - execl(command.c_str(), - command.c_str(), - gidStr.c_str(), - numFilesStr.c_str(), - firstFilename.c_str(), - reinterpret_cast(0)); + execlp(command.c_str(), + command.c_str(), + gidStr.c_str(), + numFilesStr.c_str(), + firstFilename.c_str(), + reinterpret_cast(0)); perror(("Could not execute user command: "+command).c_str()); exit(EXIT_FAILURE); }