From 192f4b2ba552a6f400a2594b49b3eb8a6501dfc4 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 3 Jan 2014 14:45:27 +0000 Subject: [PATCH] Always use MAP_SHARED. --- rmilter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rmilter.c b/rmilter.c index 3e1bca8..2aefba1 100644 --- a/rmilter.c +++ b/rmilter.c @@ -396,7 +396,7 @@ send_beanstalk_copy (const struct mlfi_priv *priv, struct beanstalk_server *srv) return; } - if ((map = mmap (NULL, st.st_size, PROT_READ, 0, fd, 0)) == MAP_FAILED) { + if ((map = mmap (NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) { msg_err ("send_beanstalk_copy: cannot mmap file %s, %s", priv->file, strerror (errno)); close (fd); return; @@ -474,7 +474,7 @@ send_beanstalk (const struct mlfi_priv *priv) return; } - if ((map = mmap (NULL, priv->eoh_pos, PROT_READ, 0, fd, 0)) == MAP_FAILED) { + if ((map = mmap (NULL, priv->eoh_pos, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) { msg_err ("send_beanstalk: cannot mmap file %s, %s", priv->file, strerror (errno)); close (fd); return;