aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-09-12 11:21:08 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2021-09-14 08:16:15 +0200
commit50239a665c88f5a95ce41146804500f5da90b19e (patch)
treee5fbe9c5f4f97b37de30d6f57f0af7c20908e680
parent0beee209778870888c3a80a9ae57e74888bc8e7b (diff)
downloadbusybox-w32-50239a665c88f5a95ce41146804500f5da90b19e.tar.gz
busybox-w32-50239a665c88f5a95ce41146804500f5da90b19e.tar.bz2
busybox-w32-50239a665c88f5a95ce41146804500f5da90b19e.zip
ash: stopped jobs should only prevent exit from interactive shell
When the user tries to exit an interactive shell with stopped jobs present the shell issues a warning and only exits if the user insists by trying to exit again. This shouldn't apply to non-interactive shells. Reported-by: Roberto A. Foglietta <roberto.foglietta@gmail.com> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 152b3b46a..5743b2377 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -5451,7 +5451,7 @@ stoppedjobs(void)
5451 int retval; 5451 int retval;
5452 5452
5453 retval = 0; 5453 retval = 0;
5454 if (job_warning) 5454 if (!iflag || job_warning)
5455 goto out; 5455 goto out;
5456 jp = curjob; 5456 jp = curjob;
5457 if (jp && jp->state == JOBSTOPPED) { 5457 if (jp && jp->state == JOBSTOPPED) {