From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27588 invoked from network); 30 Oct 2000 10:18:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Oct 2000 10:18:10 -0000 Received: (qmail 3263 invoked by alias); 30 Oct 2000 10:18:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13098 Received: (qmail 3255 invoked from network); 30 Oct 2000 10:18:02 -0000 Date: Mon, 30 Oct 2000 11:10:14 +0100 From: =?iso-8859-1?Q?Thomas_K=F6hler?= To: zsh-workers@sunsite.auc.dk Subject: Re: zsh-3.1.9-dev-6 crashes occassionally Message-ID: <20001030111014.A32725@picard.franken.de> Mail-Followup-To: =?iso-8859-1?Q?Thomas_K=F6hler?= , zsh-workers@sunsite.auc.dk References: <200010300832.JAA18859@beta.informatik.hu-berlin.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200010300832.JAA18859@beta.informatik.hu-berlin.de>; from wischnow@informatik.hu-berlin.de on Mon, Oct 30, 2000 at 09:32:00AM +0100 X-Operating-System: Linux picard 2.2.17 X-Editor: VIM - Vi IMproved 6.0h ALPHA http://www.vim.org/ X-IRC: tirc; Nick: jeanluc X-URL: http://jeanluc-picard.de/ --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 30, 2000 at 09:32:00AM +0100, Sven Wischnowsky wrote: > Thomas Koehler wrote: >=20 > > Hi there, > > I have the following problem with zsh-3.1.9-dev-6 on Debian GNU/Linux > > for i386: > > Sometimes, while trying to complete, zsh crashes and dumps core. In > > fact, the problem has been there for quite a while now, perhaps it has > > been there since the new completions system has been introduced - I > > don't know. The problem is: I can't reproduce the bug. It just happens > > to occur every once in a while. > > Well, this is not the only problem: Sometimes, zsh forgets its > > completion settings. I use this line in my .zshrc: > > zstyle ':completion:*' completer _complete _ignored _match _correct _ap= prox=3D > > imate _prefix > > Now, sometimes, for some strange reason, zsh forgets to complete on tab > > and starts to _correct things right away: For example, I had a directory > > "abcdef" and a directory "abx" and typed "cd abc" which resulted in > > "cd abx". >=20 > Thomas sent me his .zshrc, I tried, but couldn't reproduce it. But I > think I know where it comes from and why I never could reproduce it > (he reported it already quite some time ago, I think; or something > similar?). Yes, I reported this a while ago. > Thomas uses a trap handler for the ALRM signal and with TMOUT=3D1 to > update his prompt. The trap handler uses several local parameters. > Since zsh invokes (shell-code) trap handler asynchronously from the > signal handler, this could easily mess up the parameter table if the > signal comes at a time when the completion code is playing with the > parameter table itself. Ugh. Would it help if I'd change my signal handler not to use local parameters? > We talked about this several times already. We either need to protect > parts of the code (blocking signals there) or we should make the > signal handlers do as little as possible, setting only some flags or > something like that and call the trap handler shell-code somewhere > else where it can be called savely. We `decided' to use the second > solution, I think (and the first one is expensive and we have to find > all the right places and...). >=20 > We could also use a mixture: a global flag that tells the signal code > that it's save to invoke the trap handler right away but normally it > would only make them be called later. That flag could be set when zsh > is waiting for an external command, reading somethin or whatever. > (This could be a good reason to finally write a function that is > called everywhere zsh waits for something. And then we could allow > modules to hook into it or something.) Sounds like a nice idea. > Bye > Sven CU, Thomas --=20 Thomas K=F6hler Email: jean-luc@picard.franken.de | LCARS - Linux <>< WWW: http://jeanluc-picard.de | for Computers IRC: jeanluc | on All Real PGP public key available from Homepage! | Starships --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE5/UkGTEYXWMJlHuYRAoQjAJ95g+ttBU56J3PecK4dNh5mJiDCkgCeObQT qh15Ugl3Rylt9tg9dmpeTLw= =T6mo -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z--