Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
precmd: write error: interrupted
- X-seq: zsh-users 17776
- From: Yuri D'Elia <wavexx@xxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: precmd: write error: interrupted
- Date: Thu, 25 Apr 2013 18:47:44 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi everyone. I while ago I posted this:
http://www.zsh.org/mla/users/2012/msg00757.html
about precmd emitting a write error on startup.
I still have the error, as I didn't find any way to silence it (braces
around print do not work?!).
I tried hard yesterday to debug this issue, by repeatedly stracing zsh
until I got the error.
What's happening is that the terminal is being resized immediately after
starting, and a SIGWINCH is emitted while the actual "precmd" write is
being done on stdout. The call is not restarted and the write fails.
I have no idea which write is actually failing in that function (I
suppose it's some "fputs" in bin_print). Unfortunately if I try to run
zsh through a debugger the startup is too slow and never triggers the
issue. Also, this seems to only happen in tiling window managers, and
the explanation is now obvious: the terminal is forced onto a specific
geometry quickly after the window is mapped. Point in fact, "spectrwm"
gives me this problem twice as much as "awesomewm" because it's snappier
:(. I really wished I had dtrace here...
I suppose SIGWINCH should me masked when writing to the terminal.
Can somebody help with this?
1) SIGWINCH should either be masked or allow write to restart.
2) Why "precmd() { { print "HELLO" } >&- 2>&-; } doesn't suppress the
error in this case?
Thanks.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author