On Tuesday 25 August 2009 11:30:06 pm Colin Percival wrote:
> Author: cperciva
> Date: Wed Aug 26 03:30:06 2009
> New Revision: 196558
> URL: http://svn.freebsd.org/changeset/base/196558
> 
> Log:
>   Don't try to mmap the contents of empty files.  This behaviour was harmless
>   prior to r195693, since historical behaviour of mmap(2) was to silently
>   ignore length-zero mmap requests; but mmap now returns EINVAL, which caused
>   look(1) to emit an error message and fail.

FWIW, it did not silently ignore the request.  Instead it rounded the size up
to a page and mapped a page of data.  However, if you then passed that pointer
with a length of 0 to munmap() munmap() would fail.

-- 
John Baldwin
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to