2017 © Pedro PelĂĄez
 

library react-signals

Unix signals handling for ReactPHP

image

pahenrus/react-signals

Unix signals handling for ReactPHP

  • Sunday, December 27, 2015
  • by Pavel Kozlov
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3,201 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 0 Open issues
  • 4 Versions
  • 8 % Grown

The README.md

React-Signals

Unix signals handler for React PHP., (*1)

Install

The best way to install this library is through composer:, (*2)

$ composer require pahenrus/react-signals

Usage

This library provides the PCNTL class which taskes an event loop and optionally the timer interval in which the PCNTL signals should be read as constructor arguments. After initializing the class, you can use the on() method to register event listeners to PCNTL signals., (*3)

$loop = React\EventLoop\Factory::create();
$signalsHandler = new Reac\Signals\Handler($loop);

$signalsHandler->on(SIGTERM, function () {
    // Clear some queue
    // Write syslog
    // Do ALL the stuff
    echo 'Bye'.PHP_EOL;
    die();
});

$signalsHandler->on(SIGINT, function () {
    echo 'Terminated by console'.PHP_EOL;
    die();
});

echo 'Started as PID '.getmypid().PHP_EOL;
$loop->run();

The Versions

27/12 2015

dev-master

9999999-dev

Unix signals handling for ReactPHP

  Sources   Download

MIT

The Requires

 

by Avatar Pavel Kozlov

pcntl react

27/12 2015

v1.0.1

1.0.1.0

Unix signals handling for ReactPHP

  Sources   Download

MIT

The Requires

 

by Avatar Pavel Kozlov

pcntl react

27/12 2015

v1.0

1.0.0.0

Unix signals handling for ReactPHP

  Sources   Download

MIT

The Requires

 

by Avatar Pavel Kozlov

pcntl react

26/08 2014

1.0.x-dev

1.0.9999999.9999999-dev

PCNTL bindings for ReactPHP

  Sources   Download

MIT

The Requires

 

by Marius KrÀmer

pcntl react