From: Christian Neukirchen <chneukirchen@gmail.com>
To: zsh-workers@zsh.org
Subject: Re: segfault on 'echo $(< /dev/kmsg )' in zsh-5.0.2 and git
Date: Wed, 14 Aug 2013 16:42:31 +0200 [thread overview]
Message-ID: <8738qc8hbc.fsf@gmail.com> (raw)
In-Reply-To: <CAEWfL_TiRLYLbhTuohZxw_XoN1z+dem-zxYODYepk8y1mooV3Q@mail.gmail.com> (Marien Zwart's message of "Tue, 13 Aug 2013 20:53:12 +1000")
Marien Zwart <marien.zwart@gmail.com> writes:
> So if it's not too hard it'd be nice for zsh to
> survive fdopen failing, although there's something to be said for
> fdopen (glibc) or the fd (linux kernel) being broken for this specific
> crash (on /dev/kmsg).
Interestingly, GNU head fails too:
% head -c1 </dev/kmsg
head: error reading 'standard input': Invalid argument
strace shows:
read(0, 0x7fffe2ee6d70, 1) = -1 EINVAL (Invalid argument)
It seems /dev/kmsg only allows to read for at least one line in thefile:
% head -n1 /dev/kmsg | wc -c
42
% head -c41 </dev/kmsg
head: error reading 'standard input': Invalid argument
% head -c42 </dev/kmsg
6,0,0,-;Initializing cgroup subsys cpuset
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org
prev parent reply other threads:[~2013-08-14 14:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 10:53 Marien Zwart
2013-08-13 21:40 ` Axel Beckert
2013-08-14 14:42 ` Christian Neukirchen [this message]
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=8738qc8hbc.fsf@gmail.com \
--to=chneukirchen@gmail.com \
--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).