Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/httpd use MAP_SHARED for the bzremap file. avoids n...



details:   https://anonhg.NetBSD.org/src/rev/86c9bd869705
branches:  trunk
changeset: 837160:86c9bd869705
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Nov 21 17:39:19 2018 +0000

description:
use MAP_SHARED for the bzremap file.  avoids netbsd kernel complaining:

WARNING: defaulted mmap() share type to MAP_PRIVATE (pid 15478 command bozohttpd)

diffstat:

 libexec/httpd/bozohttpd.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r b5e3d59310b1 -r 86c9bd869705 libexec/httpd/bozohttpd.c
--- a/libexec/httpd/bozohttpd.c Wed Nov 21 12:34:21 2018 +0000
+++ b/libexec/httpd/bozohttpd.c Wed Nov 21 17:39:19 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bozohttpd.c,v 1.91 2018/11/21 09:37:02 mrg Exp $       */
+/*     $NetBSD: bozohttpd.c,v 1.92 2018/11/21 17:39:19 mrg Exp $       */
 
 /*     $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $      */
 
@@ -1204,7 +1204,7 @@
                return;
        }
 
-       fmap = mmap(NULL, st.st_size, PROT_READ, 0, mapfile, 0);
+       fmap = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, mapfile, 0);
        if (fmap == NULL) {
                bozowarn(httpd, "could not mmap " REMAP_FILE ", error %d",
                    errno);



Home | Main Index | Thread Index | Old Index