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

Re: Another patch to compctl-examples CVS compctl, and a bug?

schaefer@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> However, I don't know where to put a `zleactive = 0;' to prevent this.
> Does it go in getoutput()?  That would solve this particular case, but
> there might be others.  Does it go in entersubsh()?  Or is entersubsh()
> sometimes called when we haven't really forked?
> Insights appreciated.

I'm not sure if I'd go as far as `insight', but putting zleactive to
zero in entersubsh() sounds very plausible to me.  Entersubsh() is
sometimes called when we haven't really forked, but the intention is
always that the shell is about to exec a command in the manner it
would if it actually had forked.  In fact, turning off the interactive
capabilities is one of its major raisons d'etre, so this looks just
the place.

It's not clear to me, by the way, whether the subset of options that
gets turned off in entersubsh() --- currently MONITOR and USEZLE (aha!
that proves it --- if USEZLE is turned off, zleactive should certainly
go to zero) is correct.  If MONITOR, why not INTERACTIVE itself?

% for opt in monitor interactive; do
for> print $([[ -o $opt ]] && print $opt is set)
for> done

  interactive is set

*** Src/exec.c.bart	Mon Jul 22 09:27:52 1996
--- Src/exec.c	Mon Jul 22 09:28:14 1996
*** 1857,1862 ****
--- 1857,1863 ----
      if (sigtrapped[SIGQUIT] != 2)
      opts[MONITOR] = opts[USEZLE] = 0;
+     zleactive = 0;
      if (cl)

Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.

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