In the case where ExtraScript points to non-existent script, the crash worker
will create child process which will remain zombie until it's reaped. The
reaping is handled after dump_systemstate finishes. This will cause zombie
process to exist for duration of dump_systemstate execution.
This change prevents creating child process if ExtraScripts points to path
which is not executable.
Change-Id: I4caba47812b6990e9b5b54fe9929930cc667f4eb
static bool extra_script(const struct crash_info *cinfo, pid_t *pid)
{
- if (!config.extra_script)
+ if (!config.extra_script || access(config.extra_script, X_OK))
return false;
char pid_str[11];