(void)spawn_wait(args, NULL, ¶m0, ZIP_TIMEOUT_MS, NULL);
}
-static void move_dump_data(const char *from_path, const struct crash_info *cinfo)
+static bool move_dump_data(const char *from_path, const struct crash_info *cinfo)
{
int lock_fd;
+ bool is_ok = true;
if ((lock_fd = lock_dumpdir()) < 0)
- return;
+ return false;
if (!rename(from_path, cinfo->result_path))
clean_dump();
- else
- _E("Failed to move %s to %s",
- from_path, cinfo->result_path);
+ else {
+ _E("Failed to move %s to %s", from_path, cinfo->result_path);
+ is_ok = false;
+ }
unlock_dumpdir(lock_fd);
if (remove_dir(cinfo->temp_dir, 1) < 0)
_E("Failed to delete temp directory");
+
+ return is_ok;
}
static int wait_for_opt(unsigned int timeout)
_W("Failed to call extra script from config");
}
+ _I("Creating report for pid %d, tid %d, cmdline %s, pkgid %s",
+ cinfo->pid_info, cinfo->tid_info, cinfo->cmd_line, cinfo->pkgid);
+
/* Exec crash modules */
if (!execute_crash_modules(cinfo)) {
_E("Failed to get basic crash information");
} else
temp_report = cinfo->info_path;
- move_dump_data(temp_report, cinfo);
+ if (move_dump_data(temp_report, cinfo))
+ _I("Report for pid %d created at %s", cinfo->pid_info, cinfo->result_path);
if (cinfo->print_result_path)
printf("REPORT_PATH=%s\n", cinfo->result_path);