
fgsch at lodoss
Aug 8, 2012, 6:45 PM
Post #1 of 2
(263 views)
Permalink
|
|
[PATCH 2/2] Add OpenBSD support
|
|
With this all tests but one succeed in OpenBSD. As I've mentioned on irc, unless msync(2) is called a process reading from the underlying file might not see the same data as the process that mapped that file. I think having the msync here is harmless and should not affect performance since it's only required at startup but I'm happy to live with an ifdef. f.- diff --git a/bin/varnishd/mgt/mgt_shmem.c b/bin/varnishd/mgt/mgt_shmem.c index 79f8c41..ecce4c1 100644 --- a/bin/varnishd/mgt/mgt_shmem.c +++ b/bin/varnishd/mgt/mgt_shmem.c @@ -247,6 +247,9 @@ mgt_SHM_Create(void) (void)unlink(fnbuf); exit (-1); } + + /* Make sure changes are committed. */ + (void)msync(p, size, MS_SYNC); } /*-------------------------------------------------------------------- _______________________________________________ varnish-dev mailing list varnish-dev [at] varnish-cache https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
|