[PATCH 2/3] ash: stopped jobs should only prevent exit from interactive shell
Ron Yorston
rmy at pobox.com
Sun Sep 12 10:21:08 UTC 2021
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 at gmail.com>
Signed-off-by: Ron Yorston <rmy at pobox.com>
---
shell/ash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shell/ash.c b/shell/ash.c
index 99b89409e..62e1a4c7e 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -5449,7 +5449,7 @@ stoppedjobs(void)
int retval;
retval = 0;
- if (job_warning)
+ if (!iflag || job_warning)
goto out;
jp = curjob;
if (jp && jp->state == JOBSTOPPED) {
--
2.31.1
More information about the busybox
mailing list