PHPackages                             mkraemer/react-pcntl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mkraemer/react-pcntl

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mkraemer/react-pcntl
====================

PCNTL bindings for ReactPHP

v3.0.0(8y ago)57289.0k↓35%129MITPHPPHP &gt;=5.4

Since Nov 9Pushed 7y ago4 watchersCompare

[ Source](https://github.com/mkraemer/react-pcntl)[ Packagist](https://packagist.org/packages/mkraemer/react-pcntl)[ RSS](/packages/mkraemer-react-pcntl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (7)Used By (9)

Warning: this project has been deprecated
=========================================

[](#warning-this-project-has-been-deprecated)

Since v0.5 of ReactPHP [event-loop](https://github.com/reactphp/event-loop) offers native [support for signal handling](https://github.com/reactphp/event-loop/tree/v0.5.0#addsignal).

React-PCNTL
===========

[](#react-pcntl)

[![Build Status](https://camo.githubusercontent.com/3f0e810ec318cc34f1f82e7e523129a14ce4fbd1833d5aa66a7f46265c6b8196/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6d6b7261656d65722f72656163742d70636e746c2e706e67)](http://travis-ci.org/mkraemer/react-pcntl)[![Coverage Status](https://camo.githubusercontent.com/700969cbb5ea537518a86e9ed2e2ae8e3e34add54550bcc670d1fd5181cf45fd/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d6b7261656d65722f72656163742d70636e746c2f62616467652e7376673f6272616e63683d746573742d636f7665726167652d636f766572616c6c73)](https://coveralls.io/github/mkraemer/react-pcntl?branch=test-coverage-coveralls)

Basic PCNTL bindings for [React PHP](https://github.com/reactphp).

Install
-------

[](#install)

The best way to install this library is through [composer](http://getcomposer.org):

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

This library depends on the [PCNTL extension](http://www.php.net/manual/en/book.pcntl.php). **Note:** version 2 of this library requires PHP &gt;= 5.4. If you are using PHP 5.3, use the `1.0.*` version:

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

Usage
-----

[](#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.

```
$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();
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~270 days

Total

6

Last Release

3220d ago

Major Versions

v1.0.0 → v2.0.02014-08-26

1.0.x-dev → v2.1.02016-05-12

v2.2.0 → v3.0.02017-07-24

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.0

v2.1.0PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/9417d5fc23c942b5eca0647c33a34a3a4ddc0412701e9193ec4964ae10764f3c?d=identicon)[mkraemer](/maintainers/mkraemer)

---

Top Contributors

[![mkraemer](https://avatars.githubusercontent.com/u/1070200?v=4)](https://github.com/mkraemer "mkraemer (30 commits)")[![ahmader](https://avatars.githubusercontent.com/u/2225278?v=4)](https://github.com/ahmader "ahmader (1 commits)")[![christiaan](https://avatars.githubusercontent.com/u/118490?v=4)](https://github.com/christiaan "christiaan (1 commits)")[![clue](https://avatars.githubusercontent.com/u/776829?v=4)](https://github.com/clue "clue (1 commits)")[![krzysztof-sikorski](https://avatars.githubusercontent.com/u/4456257?v=4)](https://github.com/krzysztof-sikorski "krzysztof-sikorski (1 commits)")[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (1 commits)")

---

Tags

reactpcntl

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mkraemer-react-pcntl/health.svg)

```
[![Health](https://phpackages.com/badges/mkraemer-react-pcntl/health.svg)](https://phpackages.com/packages/mkraemer-react-pcntl)
```

###  Alternatives

[ijpatricio/mingle

Use Vue and React in Laravel Livewire Applications.

43445.4k2](/packages/ijpatricio-mingle)[talyssonoc/react-laravel

Package to use ReactJS with Laravel

8944.9k](/packages/talyssonoc-react-laravel)[duncan3dc/fork-helper

Simple class to fork processes in PHP and allow multi-threading

73548.0k4](/packages/duncan3dc-fork-helper)[mkraemer/react-inotify

Inotify bindings for ReactPHP

5016.3k1](/packages/mkraemer-react-inotify)[arara/process

Provides a better API to work with processes on Unix-like systems

16861.7k2](/packages/arara-process)[icecave/duct

An incremental streaming JSON parser.

773.5k1](/packages/icecave-duct)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
