dup2(errhandle[1], 2);
execvp(argv[0], &argv[0]);
- exit(EXIT_FAILURE);
+ exit(95);
} else {
/* fork failed */
goto task_popen_error_3;
close(data->pipes[1]); /* stdout */
close(data->pipes[2]); /* stderr */
- waitpid(data->pid, &status, 0);
+ if (data->pid != waitpid(data->pid, &status, 0)) {
+ abort();
+ }
+ if (!WIFEXITED(status))
+ return -1;
+ if (WIFSIGNALED(status))
+ con_out("got signaled!\n");
mem_d(data);
- return status;
+ return status ? 1 : 0;
}
#define TASK_COMPILE 0
util_snprintf(space[1], sizeof(space[1]), "%d", (int)(i));
con_out("test #%u %*s", i, strlen(space[0]) - strlen(space[1]), "");
+ //con_out("[[%*s]]",
+ // (pad[0] + pad[1] - strlen(it.tmpl->description)) + (strlen(it.tmpl->rulesfile) - pad[1]),
+ // it.tmpl->rulesfile);
+ //fflush(stdout);
/*
* Generate a task from thin air if it requires execution in
}
status = task_pclose(it.runhandles);
+ if (status != 0 && status != 1) {
+ con_out("compiler failure (returned: %i): `%s` %*s\n",
+ status,
+ it.tmpl->description,
+ (pad[0] + pad[1] - strlen(it.tmpl->description)) + (strlen(it.tmpl->rulesfile) - pad[1]),
+ it.tmpl->rulesfile
+ );
+ failed++;
+ continue;
+ }
if ((!strcmp(it.tmpl->proceduretype, "-fail") && status == EXIT_SUCCESS)
|| ( strcmp(it.tmpl->proceduretype, "-fail") && status == EXIT_FAILURE)) {
con_out("failure: `%s` %*s %*s\n",