Skip to content

Commit 77816d4

Browse files
committed
Stop trying to write log files upon first error.
Avoids spamming the console: only one message will be shown.
1 parent 831f02e commit 77816d4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

history.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ proceed_history(void) {
178178
hf->hf_fd = open(hf->hf_path,
179179
O_WRONLY|O_CREAT|O_APPEND|O_NONBLOCK, 0666);
180180
if (hf->hf_fd == -1) {
181-
warnx("cannot open %s", hf->hf_path);
181+
warnx("cannot open '%s', disabling history", hf->hf_path);
182+
enable_history = 0;
182183
while (!SIMPLEQ_EMPTY(&hf->hf_tasks)) {
183184
it = SIMPLEQ_FIRST(&hf->hf_tasks);
184185
SIMPLEQ_REMOVE_HEAD(&hf->hf_tasks, it_entry);

0 commit comments

Comments
 (0)