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

Re: Quick way to lock up your shell



In the last episode (Dec 11), Bart Schaefer said:
> schaefer<501> FOO==(cat)
> 
> The shell is now hung forever waiting for a "cat" that will never
> exit, because cat's standard input is neither closed nor connected to
> anything (expect to the parent zsh, which isn't writing to it).
> 
> This happens at least as far back as 4.2.0, so it's not a new problem.

I can't reproduce this myself; the only thing redirected inside =()
should be stdout.  It won't hang on any of my systems.  Tested zsh
between 4.1.1 and 4.3.9, on AIX, FreeBSD, Linux, and Solaris.

$ zsh -f
dan% FOO==(cat)
[hit ^T here]
load: 3.00  cmd: cat 59991 [ttyin] 0.00u 0.02s 0% 156k
[hit ^D here]
dan% 

lsof run in another tty while cat was waiting showed:

cat     59991  dan    0u  VCHR        0,157  0t96493    157 /dev/ttypg
cat     59991  dan    1w  VREG        0,112        0     21 /tmp (/dev/md0)
cat     59991  dan    2u  VCHR        0,157  0t96493    157 /dev/ttypg


-- 
	Dan Nelson
	dnelson@xxxxxxxxxxxxxxx



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