zsh-workers
 help / color / mirror / code / Atom feed
* Re: PATCH: compdump (Re: Test hanger disappeared, but ...)
@ 2000-07-05  6:39 Sven Wischnowsky
  2000-07-05  9:35 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 2000-07-05  6:39 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> ...
> 
> We seem to be running into a lot of things that cause zsh to abort all
> the way back to top level.  Do other shells give up so thoroughly in
> these situations?

That's interesting... For example, with

  while true; do echo > unwritable; sleep 1; done

zsh stops after the first attempt. bash and ksh don't stop and the
/bin/sh here stops after the first attempt, too.

With

  while true; do echo $(for); sleep 1; done

zsh stops (and prints two error messages!), bash does not stop, but
ksh and /bin/sh do.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: compdump (Re: Test hanger disappeared, but ...)
  2000-07-05  6:39 PATCH: compdump (Re: Test hanger disappeared, but ...) Sven Wischnowsky
@ 2000-07-05  9:35 ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2000-07-05  9:35 UTC (permalink / raw)
  To: Zsh hackers list

Sven wrote:
> That's interesting... For example, with
> 
>   while true; do echo > unwritable; sleep 1; done
> 
> zsh stops after the first attempt. bash and ksh don't stop and the
> /bin/sh here stops after the first attempt, too.
> 
> With
> 
>   while true; do echo $(for); sleep 1; done
> 
> zsh stops (and prints two error messages!), bash does not stop, but
> ksh and /bin/sh do.

These are all perfectly arguable.  In the second case, it's only because
parsing is done before the fork that the shell actually gives up.  If you
attempted to write to an unwritable file in the $(...) it wouldn't stop.  I
don't have any conclusion.

-- 
Peter Stephenson <pws@cambridgesiliconradio.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


^ permalink raw reply	[flat|nested] 3+ messages in thread

* PATCH: compdump (Re: Test hanger disappeared, but ...)
  2000-07-04  8:29 Test hanger disappeared, but ... RE: PATCH: Fix ZDOTDIR during "make check" for static builds Andrej Borsenkow
@ 2000-07-04 15:58 ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2000-07-04 15:58 UTC (permalink / raw)
  To: Andrej Borsenkow, zsh-workers

On Jul 4, 12:29pm, Andrej Borsenkow wrote:
} 
} > When I made my earlier patch for this (12039), I forgot that
} > Test/Modules doesn't get created when the build is static.
} 
} May be, it is something different - but now completion tests do not hang
} anymore.

It looks like compdump failure causes compinit to abort completely when
ZDOTDIR points to a nonexistent location.  The redirection on line 34
prints "no such file or directory" and then everything stops.

We seem to be running into a lot of things that cause zsh to abort all
the way back to top level.  Do other shells give up so thoroughly in
these situations?

Index: Completion/Core/compdump
===================================================================
@@ -21,6 +21,8 @@
 _d_file=${_comp_dumpfile-${0:h}/compinit.dump}.$HOST.$$
 [[ $_d_file = //* ]] && _d_file=${_d_file[2,-1]}
 
+[[ -w ${_d_file:h} ]] || return 1
+
 _d_files=( ${^~fpath:/.}/^([^_]*|*~|*.zwc)(N) )
 
 if [[ -n "$_comp_secure" ]]; then

-- 
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   


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-07-05  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-05  6:39 PATCH: compdump (Re: Test hanger disappeared, but ...) Sven Wischnowsky
2000-07-05  9:35 ` Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
2000-07-04  8:29 Test hanger disappeared, but ... RE: PATCH: Fix ZDOTDIR during "make check" for static builds Andrej Borsenkow
2000-07-04 15:58 ` PATCH: compdump (Re: Test hanger disappeared, but ...) Bart Schaefer

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).