Instance Namespace Reference

code related to Squid Instance and PID file management

Functions

void ThrowIfAlreadyRunning ()
 
void WriteOurPid ()
 creates a PID file; throws on error More...
 
pid_t Other ()
 

Function Documentation

pid_t Instance::Other ( )
Returns
another Squid instance PID Throws if PID file maintenance is disabled.

Definition at line 127 of file Instance.cc.

References GetOtherPid(), PidFilename(), FileOpeningConfig::ReadOnly(), and TexcHere.

Referenced by sendSignal().

void Instance::ThrowIfAlreadyRunning ( )

Usually throws if another Squid instance is running. False positives are highly unlikely, but the caller must tolerate false negatives well: We may not detect another running instance and, hence, may not throw. Does nothing if PID file maintenance is disabled.

Definition at line 138 of file Instance.cc.

References debugs, File::Optional(), PidFilename(), FileOpeningConfig::ReadOnly(), and ThrowIfAlreadyRunningWith().

Referenced by SquidMain().

void Instance::WriteOurPid ( )

Creates or updates the PID file for the current process. Does nothing if PID file maintenance is disabled.

Definition at line 177 of file Instance.cc.

References DBG_IMPORTANT, debugs, Must, PidFilename(), SBuf::Printf(), FileOpeningConfig::ReadWrite(), RemoveInstance(), File::synchronize(), ThrowIfAlreadyRunningWith(), File::truncate(), and File::writeAll().

Referenced by SquidMain(), and watch_child().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors