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 <[email protected]>
Signed-off-by: Ron Yorston <[email protected]>
---
 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

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to