aboutcoders/process-control-bundle

A symfony bundle that provides process control

Maintainers

👁 aboutcoders

Package info

github.com/aboutcoders/process-control-bundle

Homepage

Type:symfony-bundle

pkg:composer/aboutcoders/process-control-bundle

Statistics

Installs: 3 761

Dependents: 2

Suggesters: 2

Stars: 4

Open Issues: 0

1.3.0 2016-11-02 09:15 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 1da47e4573afa8d2706603ca1c730874d2e0464f

  • Hannes Schulz <hannes.schulz.woop@aboutcoders.com>

symfonyprocessbundlecontrolpcntl

This package is not auto-updated.

Last update: 2026-06-21 04:28:14 UTC


README

A symfony bundle that provides process control.

Build Status: 👁 Build Status

Installation

Add the AbcProcessControlBundle to your composer.json file

{
 "require": {
 "aboutcoders/process-control-bundle": "~1.0"
 }
}

Then include the bundle in the AppKernel.php class

public function registerBundles()
{
 $bundles = array(
 // ...
 new Abc\Bundle\ProcessControlBundle\AbcProcessControlBundle(),
 // ...
 );
}

Usage

The AbcProcessControlBundle registers a service with the name abc.process_control.controller in the service container. This service is by default initialized with a PCNTL implementation, that listents to the SIGTERM event and thus indicates to exist, when this signal was sent.

 $controller = $container->get('abc.process_control.controller');
 
 if($controller->doExit()){
 // true if SIGTERM was sent
 }

Configuration

Registration of the service abc.process_control.controller is enabled by default. You can disable that with the following configuration:

abc_process_control:
 register_controller: false

Note: When registration is disabled the service abc.process_control.controller does not exist within the service container.