Re: read() builtin doesn't read integer value /proc files (but bash's does)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 04, 2010 at 07:35:04PM +0000, Jilles Tjoelker wrote:
> 
> > I attached an updated patch that corrects this pb by discarding the
> > buffer when opening a new file.
> 
> This discarding is still bad as it throws away valid data if the open
> file description is shared. This happens if stdin is redirected inside a

I'm with Jilles on this.  I also don't particularly feel like
bloating dash just because of the borked /proc interface when
there is a perfectly adequate work-around in "cat".

	value=$(cat /proc/file)

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux