[Bug 598279] Re: read builtin can't handle some synthetic files
Brian Murray
brian at ubuntu.com
Mon Oct 17 22:06:07 UTC 2011
*** This bug is a duplicate of bug 598275 ***
https://bugs.launchpad.net/bugs/598275
** This bug has been marked a duplicate of bug 598275
read() builtin doesn't work with /proc files containing only an integer value
** Tags added: udd-find
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dash in Ubuntu.
https://bugs.launchpad.net/bugs/598279
Title:
read builtin can't handle some synthetic files
Status in “dash” package in Ubuntu:
New
Status in “dash” package in Debian:
Confirmed
Bug description:
Binary package hint: dash
Ubuntu 10.04 LTS, dash 0.5.5.1-3ubuntu2.
Dash's read builtin fails when trying to read some files under /proc,
e.g. almost every file under /proc/sys/net/ipv4. To make matters
worse, it sets the output environment variable to the first byte of
the file. This means that scripts that only check the resulting env
var may use bad data. This is the cause of bug #598275. Here's my
test case:
dash# ls -l /proc/sys/net/ipv4/netfilter/ip_conntrack_max
-rw-r--r-- 1 root root 0 Jun 24 14:00 /proc/sys/net/ipv4/netfilter/ip_conntrack_max
dash# cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max
7852
dash# read out </proc/sys/net/ipv4/netfilter/ip_conntrack_max
dash# echo $?
1
dash# echo $out
7
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/598279/+subscriptions
More information about the foundations-bugs
mailing list