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

2010-09-04 Thread Steve Schnepp
in new files (bufreadcmd.c & .h), in order to ease its understanding. -- Steve Schnepp http://blog.pwkf.org/ > > A possible fix is to check first if the input supports seeking. If it > does, use the buffering and at the end of the line seek backwards for > the number of by

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

2010-09-03 Thread Steve Schnepp
ne byte from offset 0 should fail like reading one byte from > offset 1 does). +1 for "the proper way to read these files needs to be documented" and I also think that emitting an error would be better than silently returning erroneous data. [ EOVERFLOW is coming to my mind ] --

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

2010-09-02 Thread Steve Schnepp
2010/9/1 Steve Schnepp : > conforming to POSIX isn't a realistic option, would it be possible to > have a workaround that doesn't involve an external tool like cat(1) ? Hi, I just hacked & attached a little patch away to be able to solve this case. Feel free to reply with y

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

2010-09-01 Thread Steve Schnepp
ian.org/cgi-bin/bugreport.cgi?bug=595063 [2] http://lxr.linux.no/#linux+v2.6.32/kernel/sysctl.c#L2371 -- Steve Schnepp http://blog.pwkf.org/ -- To unsubscribe from this list: send the line "unsubscribe dash" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html