2017 © Pedro PelĂĄez
 

library react-pcntl

PCNTL bindings for ReactPHP

image

mkraemer/react-pcntl

PCNTL bindings for ReactPHP

  • Thursday, July 19, 2018
  • by mkraemer
  • Repository
  • 4 Watchers
  • 54 Stars
  • 165,609 Installations
  • PHP
  • 14 Dependents
  • 2 Suggesters
  • 15 Forks
  • 3 Open issues
  • 8 Versions
  • 10 % Grown

The README.md

Warning: this project has been deprecated

Since v0.5 of ReactPHP event-loop offers native support for signal handling., (*1)

React-PCNTL

Build Status Coverage Status, (*2)

Basic PCNTL bindings for React PHP., (*3)

Install

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

{
    "require": {
        "mkraemer/react-pcntl": "^3.0.*"
    }
}

This library depends on the PCNTL extension. Note: version 2 of this library requires PHP >= 5.4. If you are using PHP 5.3, use the 1.0.* version:, (*5)

{
    "require": {
        "mkraemer/react-pcntl": "1.0.*"
    }
}

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., (*6)

$loop = React\EventLoop\Factory::create();
$pcntl = new MKraemer\ReactPCNTL\PCNTL($loop);

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

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

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

The Versions

19/07 2018

dev-master

9999999-dev

PCNTL bindings for ReactPHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marius KrÀmer

pcntl react

19/07 2018

dev-test

dev-test

PCNTL bindings for ReactPHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marius KrÀmer

pcntl react

24/07 2017

v3.0.0

3.0.0.0

PCNTL bindings for ReactPHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marius KrÀmer

pcntl react

16/11 2016

v2.2.0

2.2.0.0

PCNTL bindings for ReactPHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marius KrÀmer

pcntl react

12/05 2016

v2.1.0

2.1.0.0

PCNTL bindings for ReactPHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marius KrÀmer

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

26/08 2014

v2.0.0

2.0.0.0

PCNTL bindings for ReactPHP

  Sources   Download

MIT

The Requires

 

by Marius KrÀmer

pcntl react

09/11 2013

v1.0.0

1.0.0.0

PCNTL bindings for ReactPHP

  Sources   Download

MIT

The Requires

 

by Marius KrÀmer

pcntl react