summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-02-03 16:09:43 -0500
committerJune McEnroe <june@causal.agency>2022-01-21 22:05:46 -0500
commit5c9244973b51e6c4f5f76cb6fcda14449d84a732 (patch)
tree673a4273bd326b5b32a700c327bc69cc03223034
parentdash: Set H_SETUNIQUE (diff)
downloaddash-5c9244973b51e6c4f5f76cb6fcda14449d84a732.tar.gz
dash-5c9244973b51e6c4f5f76cb6fcda14449d84a732.zip
dash: Warn twice about stopped jobs
Not really sure why this previously set job_warning to 2 rather
than 1. Anyway I often just press ^D again after the warning without
really thinking, so do it twice.
-rw-r--r--src/jobs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jobs.c b/src/jobs.c
index f30313b..8fb9d4b 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -1207,12 +1207,12 @@ stoppedjobs(void)
 	int retval;
 
 	retval = 0;
-	if (job_warning)
+	if (job_warning > 1)
 		goto out;
 	jp = curjob;
 	if (jp && jp->state == JOBSTOPPED) {
 		out2str("You have stopped jobs.\n");
-		job_warning = 2;
+		job_warning++;
 		retval++;
 	}