Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 3.0.6-pre-5 problem



Jos Backus wrote:

> More info: I just rebuilt zsh with --enable-zsh-debug. Now, when I start an
> xterm, start mutt (using the function) and press ^Z, both mutt and the xterm
> disappear, leaving a zsh.core file behind. See stacktrace.
> 
> Interestingly, this backtrace looks quite different from the first one.

(This fact irritates me mightily.)

Anyway, I couldn't reproduce it but there is no harm in adding some
security code to execpline(). I guess this will not apply cleanly to
3.0.6, though.

And, of course, I have 6819 applied (which fixed a problem with
suspending shell functions, although that problem didn't cause a
SEGV).


Bye
 Sven

diff -u os/exec.c Src/exec.c
--- os/exec.c	Thu Jun 24 14:03:58 1999
+++ Src/exec.c	Fri Jun 25 08:10:28 1999
@@ -904,15 +904,16 @@
 		    if (!jn->procs->next)
 			jn->gleader = mypgrp;
 
-		    for (pn = jobtab[jn->other].procs; pn; pn = pn->next)
-			if (WIFSTOPPED(pn->status))
-			    break;
+		    if (jn->stat & STAT_SUPERJOB) {
+			for (pn = jobtab[jn->other].procs; pn; pn = pn->next)
+			    if (WIFSTOPPED(pn->status))
+				break;
 
-		    if (pn) {
-			for (qn = jn->procs; qn->next; qn = qn->next);
-			qn->status = pn->status;
+			if (pn) {
+			    for (qn = jn->procs; qn->next; qn = qn->next);
+			    qn->status = pn->status;
+			}
 		    }
-
 		    jn->stat &= ~(STAT_DONE | STAT_NOPRINT);
 		    jn->stat |= STAT_STOPPED | STAT_CHANGED;
 		    printjob(jn, !!isset(LONGLISTJOBS), 1);

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author