Exit when executing the input fails,
if -o option (log file) is set and not in interactive mode. Enables running the paranoia suite without hanging if something goes wrong.
This commit is contained in:
parent
d02f2feee4
commit
6818b52a87
|
|
@ -1091,13 +1091,17 @@ int main(int argc, char **argv)
|
|||
cp_nocc = FALSE;
|
||||
}
|
||||
|
||||
#ifndef HAS_WINGUI
|
||||
if ((iflag || istty) && !ft_batchmode) {
|
||||
/* Enable interactive prompting. */
|
||||
|
||||
#else
|
||||
if (iflag && !ft_batchmode) {
|
||||
#endif
|
||||
bool x_true = TRUE;
|
||||
cp_vset("interactive", CP_BOOL, &x_true);
|
||||
}
|
||||
|
||||
|
||||
if (ft_servermode) { /* in server no init file */
|
||||
readinit = FALSE;
|
||||
}
|
||||
|
|
@ -1322,6 +1326,8 @@ int main(int argc, char **argv)
|
|||
/* Copy the input file name for becoming another file search path */
|
||||
if (inp_spsource(tempfile, FALSE, dname, FALSE) != 0) {
|
||||
fprintf(stderr, " Simulation interrupted due to error!\n\n");
|
||||
if (oflag && !cp_getvar("interactive", CP_BOOL, NULL, 0))
|
||||
exit(EXIT_BAD);
|
||||
}
|
||||
tfree(dname);
|
||||
gotone = TRUE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue