summaryrefslogtreecommitdiff
path: root/cmds/incidentd/src/Section.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/incidentd/src/Section.cpp')
-rw-r--r--cmds/incidentd/src/Section.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/incidentd/src/Section.cpp b/cmds/incidentd/src/Section.cpp
index 1bf795bb6557..22053ef3c53a 100644
--- a/cmds/incidentd/src/Section.cpp
+++ b/cmds/incidentd/src/Section.cpp
@@ -521,7 +521,7 @@ CommandSection::Execute(ReportRequestSet* requests) const
ALOGW("CommandSection '%s' failed to set up stdout: %s", this->name.string(), strerror(errno));
_exit(EXIT_FAILURE);
}
- execv(this->mCommand[0], (char *const *) this->mCommand);
+ execvp(this->mCommand[0], (char *const *) this->mCommand);
int err = errno; // record command error code
ALOGW("CommandSection '%s' failed in executing command: %s", this->name.string(), strerror(errno));
_exit(err); // exit with command error code