]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/shm.cc
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
10 #include "compat/shm.h"
12 #if _SQUID_FREEBSD_ && (__FreeBSD__ >= 7)
13 #include <sys/sysctl.h>
17 * Some systems have filesystem-based resources and interpret segment names
18 * as file paths. The so-called 'portable' "/name" format does not work well
19 * for them. And, according to Boost::interprocess, recent FreeBSD versions
20 * make this decision depending on whether the shm_open() caller is jailed!
23 shm_portable_segment_name_is_path()
25 #if _SQUID_HPUX_ || _SQUID_OSF_ || defined(__vms) || (_SQUID_FREEBSD_ && (__FreeBSD__ < 7))
29 size_t len
= sizeof(jailed
);
30 ::sysctlbyname("security.jail.jailed", &jailed
, &len
, NULL
, 0);