AT&T Unix PC : 17-monitor-mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 -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) {




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux