Re: [PATCH] Portability of dash to legacy systems, such as AT&T Unix PC : 17-monitor-mode
Alain Knaff <[email protected]> Tue, 12 Nov 2024 23:57:45 +0100
| Newsgroups | org.kernel.vger.dash |
|---|---|
| Message-ID | <[email protected]> |
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
dash-0.5.12+17-monitor-mode.diff
(text/x-patch, 424 B)
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) {