zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
	zsh-workers@sunsite.auc.dk
Subject: Re: Last patch
Date: Mon, 4 Dec 2000 10:35:06 +0000	[thread overview]
Message-ID: <1001204103506.ZM12900@candle.brasslantern.com> (raw)
In-Reply-To: <200012040906.KAA05544@beta.informatik.hu-berlin.de>

On Dec 4, 10:06am, Sven Wischnowsky wrote:
} 
} I wrote:
} 
} > I'll have a look at the weekend. Let's see if we can do it with
} > signal-queueing.
} 
} I had.  It's a nightmare.  I haven't yet checked everything, but the
} patch already has ~3600 lines.
[...]
} Some (if not most) of the things I haven't tried to make secure yet
} include the history code and the job- and signal-tables. But even
} without them, the many queue/unqueue pairs don't look like the right
} solution.  Maybe we should try to identify a hopefully small set of
} places where we put them, each making a possibly large part of the
} shell secure and later try to move the pairs further and further down
} the call chains.

Yes, that would be my suggestion, with some careful choosing of the large
parts.  (I'm sorry that I don't have time right now to do much more than
offer advice about this -- I'm the busiest with work right now that I've
been for some months.)

Another thing is that we should recognize that zsh has been working
reasonably well without this for a very long time.  If we can pick off
the places where the shell spends most of its CPU cycles, we can make
what problems there are, far less likely.  Then worry about covering
the rest of the cases as we have opportunity.

} The main problem seems to be that we
} have many places where we get, for example, a pointer to a hash node,
} keep it in a local variable and later use it.
[...]
} In many places this can quite easily be wrapped inside a queue_signals()/
} unqueue_signals() pair but there are places where it is extremly
} difficult (execcmd(), for example, or the function-autoloading code).

At least the two examples you gave are cases where I think it would be
OK to queue signals over a wider span of code.  Some signals are blocked
for a good portion of execcmd() already, aren't they?  (To avoid SIGCHLD
races.)

} Another problem is the module code.  Most of this could probably be
} solved by queue/unqueue pairs (I've done/tried that) and by
} disallowing to unload modules from a handler.

Couldn't attempting unload from a handler be treated the same as from
a wrapper, i.e., just set the MOD_UNLOAD flag on the module struct?

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2000-12-04 10:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-04  9:06 Sven Wischnowsky
2000-12-04 10:35 ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-12-01  9:32 Sven Wischnowsky
2000-12-01 10:15 ` Peter Stephenson
2000-11-30 18:30 Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1001204103506.ZM12900@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).