• Geoff Simmons's avatar
    Don't bother writing a terminating null to the mapped page. · d0bc503b
    Geoff Simmons authored
    Since we mmap length st_size + 1, and since mmap(2) fills the mapped
    page past the length of the file with nulls, we ensure that there
    is a terminating null after the file contents.
    
    This means that the file can be opened with O_RDONLY and mmap'd
    with PROT_READ. So the child process only needs read permissions
    on the file.
    
    Pointed out by Nils
    d0bc503b
Name
Last commit
Last update
m4 Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
CONTRIBUTING.rst Loading commit data...
COPYING Loading commit data...
INSTALL.rst Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...