In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Here's some text from my open(2) manpage: > Transfer sizes, and the alignment of user buffer and file offset must > all > be multiples of the logical block size of the file system.
Does that apply in the example he gave, < /dev/sda1 ? It seems to me this would not go through any filesystem anyway. That might account for the "invalid argument" error, but at any rate it would be irrelevant. Plus it doesn't seem to score very high on portability, according to the Linux man page I'm looking at -- apparently not a POSIX or any such standard, just borrowed from Irix in recent Linux versions, and FreeBSD with slightly different behavior. Don't see any trace of it in NetBSD, MacOS X. > It's unlikely that in practice you can get Python's sys.stdin.read() or > os.read() to reliably use a buffer that fits the alignment restriction. Though of course os.read() would eliminate one layer of buffering altogether. Might be worth a try. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list