diff mbox series

AT&T Unix PC : 17-monitor-mode

Message ID 735f2589-069e-4928-af9c-3840da5a3a3b@knaff.lu (mailing list archive)
State Under Review
Delegated to: Herbert Xu
Headers show
Series AT&T Unix PC : 17-monitor-mode | expand

Commit Message

Alain Knaff Nov. 17, 2024, 6:53 p.m. UTC
Hi,

Monitor mode is the feature that makes the shell display the status of
any exited children when pressing return at the shell prompt.

It can be enabled/disabled using set -m/set +m. It is enabled by
default in interactive shells, and disabled in non-interactive shells
(such as those running a script)

Normally monitor mode doesn't need any advanced job control features
to work, but for some reason dash only makes it available if job
control is available. This patch changes this by directly probing
mflag rather than jobctl.

Regards,

Alain
diff mbox series

Patch

diff -X ../exclude.txt -urN dash-0.5.12+15-realloc-null/src/main.c dash-0.5.12+16-monitor-mode/src/main.c
--- dash-0.5.12+15-realloc-null/src/main.c	2024-10-21 10:44:12.732533133 +0000
+++ dash-0.5.12+16-monitor-mode/src/main.c	2024-11-01 21:20:07.814920133 +0000
@@ -209,7 +209,7 @@ 
 		int skip;
 
 		setstackmark(&smark);
-		if (jobctl)
+		if (mflag)
 			showjobs(out2, SHOW_CHANGED);
 		inter = 0;
 		if (iflag && top) {