HomeFreeBSD

Don't try to mmap the contents of empty files. This behaviour was harmless

Description

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.

Among other things, this makes freebsd-update fetch on a newly installed
8.0-BETA3 system print bogus warning messages.

MFC after: 3 days

Details

Provenance
cpercivaAuthored on Aug 26 2009, 3:30 AM
Parents
rG74d1c4927a3b: Fix poll() on half-closed sockets, while retaining POLLHUP for fifos.
Branches
Unknown
Tags
Unknown

Event Timeline