diff --git a/src/driver.c b/src/driver.c index 0eab1c3..f832d60 100644 --- a/src/driver.c +++ b/src/driver.c @@ -46,6 +46,10 @@ int main(void) { } showhelp = 0; + intent = "interesting"; + perror("errno"); + if(errno) goto catch; + intent = "journal"; jrnl = journal(); fprintf(stderr, "Journal: %s.\n", journal_to_string(&jrnl)); @@ -88,6 +92,10 @@ int main(void) { goto finally; catch: perror(intent); + /* Don't know if that will give real insight into the problem… */ + if(freopen("error.txt", "w", stdout)) { + printf("Journal: %s.\n", journal_to_string(&jrnl)); + } finally: /* fixme: ~scan should be idempotent but it's not on disabling ASLR, which debug mode is in. */