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

Re: suggested PATCH



On Nov 10,  9:19am, Sven Wischnowsky wrote:
} Subject: suggested PATCH
}
} If you exit a shell with running jobs you get this `n jobs SIGHUPed'
} message. Exiting is done in zexit(), which calls killrunjobs(), which
} in turn prints that message using zerr() -- and that sets errflag=1.

Seems to me that ought to be calling zwarn().

} So this patch makes the returned value in mathevall() be initialised
} to zero

That's good.

} but it also makes errflag be reset in zexit(). It's that last 
} part I'm not so sure about -- maybe you all like this history-saving-
} avoidance?

No, that's got to be wrong.  Since killrunjobs() is never called from
anywhere except zexit(), I think using zwarn() rather than setting and
then clearing errflag is the way to go.

So, my suggestion is to use only the math.c hunk of Sven's patch, and
use this instead of the builtin.c hunk:

Index: Src/signals.c
===================================================================
@@ -576,7 +576,7 @@
                 killed++;
         }
     if (killed)
-        zerr("warning: %d jobs SIGHUPed", NULL, killed);
+        zwarn("warning: %d jobs SIGHUPed", NULL, killed);
 }
 
 

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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