* Re: Bug#112424: zsh: zsh can't read from /proc
[not found] <20010916091351.593.qmail@bzzrt.pooh.oi>
@ 2001-09-17 15:34 ` Clint Adams
2001-09-17 16:39 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Clint Adams @ 2001-09-17 15:34 UTC (permalink / raw)
To: zsh-workers; +Cc: Wessel Dankers, 112424-forwarded
Do we want to special-case this?
> zsh seems to have trouble reading from /proc special files.
> For example:
>
> bzzrt:/home/wsl% read HOST </proc/sys/kernel/hostname
> 1 b:/home/wsl% cat /proc/sys/kernel/hostname | read HOST
> bzzrt:/home/wsl%
>
> After the first command, $HOST is set to "b" and the return code of
> the command is 1 (my prompt is configured to show this). When using
> cat everything is fine, and $HOST is once again set to the proper
> host name ("bzzrt").
>
> The problem is that zsh reads files one byte at a time. This is
> perfectly legitimate of course, but Linux does not seem to support
> that for /proc files. An acceptable workaround for Linux' poor
> performance would be to fstat(stdin) and use a large read if stat
> reports a zero file size (and the file is a plain file).
>
> Of course, the real location to fix this would be the Linux kernel.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-09-17 16:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20010916091351.593.qmail@bzzrt.pooh.oi>
2001-09-17 15:34 ` Bug#112424: zsh: zsh can't read from /proc Clint Adams
2001-09-17 16:39 ` 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).