]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/Instance.h
2 * Copyright (C) 1996-2021 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.
9 #ifndef SQUID_INSTANCE_H
10 #define SQUID_INSTANCE_H
13 #include <sys/types.h>
16 /// code related to Squid Instance and PID file management
19 /// Usually throws if another Squid instance is running. False positives are
20 /// highly unlikely, but the caller must tolerate false negatives well:
21 /// We may not detect another running instance and, hence, may not throw.
22 /// Does nothing if PID file maintenance is disabled.
23 void ThrowIfAlreadyRunning();
25 /// Creates or updates the PID file for the current process.
26 /// Does nothing if PID file maintenance is disabled.
29 /// \returns another Squid instance PID
30 /// Throws if PID file maintenance is disabled.
33 } // namespace Instance