From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org, "Yuri D'Elia" <wavexx@users.sourceforge.net>,
zsh-users@zsh.org
Subject: Re: precmd: write error: interrupted
Date: Thu, 25 Apr 2013 17:53:41 -0700 [thread overview]
Message-ID: <130425175341.ZM17766@torch.brasslantern.com> (raw)
In-Reply-To: <klc0n1$34u$1@ger.gmane.org>
(Redirecting this to -workers, so Yuri Cc'd in case he's only on -users)
On Apr 25, 9:38pm, Yuri D'Elia wrote:
}
} precmd() { { print x } 2>/dev/null }
}
} still doesn't suppress the error.
Interesting! Something is restoring the stderr descriptors before the
error message in bin_print is written. Here is a bit of strace from
'zsh -f' with { print -n $'x\r' } 2>/devnull running in a loop on the
command line (not from a precmd):
open("/dev/null", O_WRONLY|O_CREAT|O_NOCTTY|O_TRUNC|O_LARGEFILE, 0666) = 3
dup2(3, 2) = 2
write(1, "x\r", 2) = ? ERESTARTSYS (To be restarted)
--- SIGWINCH (Window changed) @ 0 (0) ---
dup2(12, 2) = 2
dup2(11, 2) = 2
write(10, "\33[1m\33[7m%\33[27m\33[1m\33[0m
\r \r", 105) = 105
write(2, "print: write error: interrupt\n", 30) = 30
Those dup2 calls should happen only at the end of execcmd after bin_print
has already returned, but somehow they appear to be happening after the
signal handler is called but before the error message.
Attaching with a debugger blocks the interrupt so I haven't been able to
stack-trace the source of the dup2 calls.
next parent reply other threads:[~2013-04-26 0:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <klbmnc$ieh$1@ger.gmane.org>
[not found] ` <130425111646.ZM17258@torch.brasslantern.com>
[not found] ` <klc0n1$34u$1@ger.gmane.org>
2013-04-26 0:53 ` Bart Schaefer [this message]
[not found] ` <20130425193817.2f82b60c@pws-pc.ntlworld.com>
[not found] ` <130425151839.ZM17476@torch.brasslantern.com>
2013-04-26 8:42 ` Peter Stephenson
[not found] ` <klc2ah$jiv$1@ger.gmane.org>
[not found] ` <130426080805.ZM18619__18102.73175729$1366989065$gmane$org@torch.brasslantern.com>
2013-04-26 17:59 ` Yuri D'Elia
[not found] ` <130426080805.ZM18619@torch.brasslantern.com>
[not found] ` <517C0E09.4040505@users.sourceforge.net>
2013-04-27 22:31 ` Bart Schaefer
2013-04-28 15:30 ` Yuri D'Elia
2013-04-29 1:03 ` Bart Schaefer
2013-04-29 1:59 ` Bart Schaefer
2013-05-05 0:01 ` Frank Terbeck
2013-05-05 6:52 ` Bart Schaefer
2013-05-05 9:38 ` Frank Terbeck
2013-05-05 17:53 ` Bart Schaefer
2013-05-05 18:37 ` Frank Terbeck
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=130425175341.ZM17766@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=wavexx@users.sourceforge.net \
--cc=zsh-users@zsh.org \
--cc=zsh-workers@zsh.org \
/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).