Re: read fails on null-byte: v4.1.7 FreeBSD 8.0 (amd64)

2011-11-29 Thread Matthew Story
patch -p1) commit df4bdef6d6066beeac57cf36f54cff7bde8f5ea3 Author: Matthew Story Date: Mon Nov 28 22:51:59 2011 -0500 Update documentation (both man and info) to reflect read NUL character behavior, and -d ''. Signed-off-by: Matthew Story diff --git a/doc/bash.

Re: read fails on null-byte: v4.1.7 FreeBSD 8.0 (amd64)

2011-11-29 Thread Matthew Story
On Nov 29, 2011, at 9:39 AM, Chet Ramey wrote: > On 11/29/11 8:29 AM, Greg Wooledge wrote: > >> [...snip] > > It's possible to have both. You can handle matching a NUL delimiter and > skip NUL bytes in the input if the delimiter isn't NUL. This is exactly the behavior that my patch provides,

Re: read fails on null-byte: v4.1.7 FreeBSD 8.0 (amd64)

2011-11-28 Thread Matthew Story
documentation, but they are quite large, if you want them I'm happy to send them along as well. cheers, -matt On Nov 24, 2011, at 12:08 AM, Chet Ramey wrote: > On 11/23/11 9:44 PM, Matthew Story wrote: >> >> On Nov 23, 2011, at 7:09 PM, Chet Ramey wrote: >> >>

Re: read fails on null-byte: v4.1.7 FreeBSD 8.0 (amd64)

2011-11-23 Thread Matthew Story
On Nov 23, 2011, at 7:09 PM, Chet Ramey wrote: > On 11/23/11 6:54 PM, Matthew Story wrote: >> On Nov 23, 2011, at 4:47 PM, Chet Ramey wrote: >> >>> On 11/23/11 9:03 AM, Matthew Story wrote: >>>> [... snip] > > Yes, sorry. That's what the

Re: read fails on null-byte: v4.1.7 FreeBSD 8.0 (amd64)

2011-11-23 Thread Matthew Story
>> Bash doesn't drop NULs like the >> FreeBSD (not the Bourne) shell. one last note on bash dropping NULs: [bash ~]$ foo=`printf 'foo\0bar'` [bash ~]$ echo $foo |od -a 000f o o b a r nl 007 > > FreeBSD sh indeed, apologies for the miss

Re: read fails on null-byte: v4.1.7 FreeBSD 8.0 (amd64)

2011-11-23 Thread Matthew Story
On Nov 23, 2011, at 4:47 PM, Chet Ramey wrote: > On 11/23/11 9:03 AM, Matthew Story wrote: >> Bash Version: GNU bash, version 4.1.7(1)-release (amd64-portbld-freebsd8.0) >> OS: FreeBSD 8.0 >>Hardware: amd64 >> Environment: jail >> Description: read

read fails on null-byte: v4.1.7 FreeBSD 8.0 (amd64)

2011-11-23 Thread Matthew Story
Bash Version: GNU bash, version 4.1.7(1)-release (amd64-portbld-freebsd8.0) OS: FreeBSD 8.0 Hardware: amd64 Environment: jail Description: read terminates reading all records at first null-byte ( chr(0) ) in a stream, null-bytes are valid ascii characters and should not cause read