This file provides a framework for writing multithreading code that can be interrupted, even when blocked on system calls or C library calls.
One must first call Passenger::setupSysCallInterruptionSupport(). Then one may use the functions in Passenger::InterruptableCalls as drop-in replacements for system calls or C library functions. Thread::interrupt() and Thread::interruptAndJoin() should be used for interrupting threads.
By default, interruptions are caught.
Classes | |
| class | Application |
| Represents a single Ruby on Rails or Rack application instance. More... | |
| class | ApplicationPool |
| A persistent pool of Applications. More... | |
| class | ApplicationPoolServer |
| Multi-process usage support for ApplicationPool. More... | |
| class | DummySpawnManager |
| A dummy SpawnManager replacement for testing/debugging purposes. More... | |
| class | SystemException |
| Represents an error returned by a system call or a standard library call. More... | |
| class | FileSystemException |
| A filesystem error, as returned by the operating system. More... | |
| class | IOException |
| Represents an error that occured during an I/O operation. More... | |
| class | FileNotFoundException |
| Thrown when a certain file cannot be found. More... | |
| class | ConfigurationException |
| Thrown when an invalid configuration is given. More... | |
| class | SpawnException |
| Thrown when SpawnManager or ApplicationPool fails to spawn an application instance. More... | |
| class | BusyException |
| The application pool is too busy and cannot fulfill a get() request. More... | |
| class | MessageChannel |
| Convenience class for I/O operations on file descriptors. More... | |
| class | SpawnManager |
| Spawning of Ruby on Rails/Rack application instances. More... | |
| class | StandardApplicationPool |
| A standard implementation of ApplicationPool for single-process environments. More... | |
| class | Thread |
| Thread class with system call interruption support. More... | |
| struct | AnythingToString |
| Used internally by toString(). More... | |
| struct | Passenger::AnythingToString< vector< string > > |
| Used internally by toString(). More... | |
| class | TempFile |
| Represents a temporary file. More... | |
Namespaces | |
| namespace | InterruptableCalls |
| System call and C library call wrappers with interruption support. | |
Typedefs | |
| typedef shared_ptr< Application > | ApplicationPtr |
| Convenient alias for Application smart pointer. | |
| typedef shared_ptr< SpawnManager > | SpawnManagerPtr |
| Convenient alias for SpawnManager smart pointer. | |
Functions | |
| void | setupSyscallInterruptionSupport () |
| Setup system call interruption support. | |
| int | atoi (const string &s) |
| Converts the given string to an integer. | |
| void | split (const string &str, char sep, vector< string > &output) |
| Split the given string using the given separator. | |
| bool | fileExists (const char *filename) |
| Check whether the specified file exists. | |
| string | findSpawnServer (const char *passengerRoot=NULL) |
| Find the location of the Passenger spawn server script. | |
| string | findApplicationPoolServer (const char *passengerRoot) |
| Find the location of the Passenger ApplicationPool server executable. | |
| string | canonicalizePath (const string &path) |
| Returns a canonical version of the specified path. | |
| bool | verifyRailsDir (const string &dir) |
| Check whether the specified directory is a valid Ruby on Rails 'public' directory. | |
| bool | verifyRackDir (const string &dir) |
| Check whether the specified directory is a valid Rack 'public' directory. | |
| bool | verifyWSGIDir (const string &dir) |
| Check whether the specified directory is a valid WSGI 'public' directory. | |
| template<typename T> | |
| shared_ptr< T > | ptr (T *pointer) |
Convenience shortcut for creating a shared_ptr. | |
| template<typename T> | |
| string | toString (T something) |
| Convert anything to a string. | |
| typedef shared_ptr<Application> Passenger::ApplicationPtr |
Convenient alias for Application smart pointer.
| typedef shared_ptr<SpawnManager> Passenger::SpawnManagerPtr |
Convenient alias for SpawnManager smart pointer.
| void Passenger::setupSyscallInterruptionSupport | ( | ) |
Setup system call interruption support.
This function may only be called once. It installs a signal handler for INTERRUPTION_SIGNAL, so one should not install a different signal handler for that signal after calling this function.
1.5.5