PHPackages                             hhpack/process - 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. hhpack/process

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

hhpack/process
==============

Process utility library for Hack

1.6.0(7y ago)4247[2 issues](https://github.com/hhpack/process/issues)1MITShell

Since Oct 26Pushed 7y agoCompare

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

READMEChangelogDependencies (5)Versions (24)Used By (1)

process
=======

[](#process)

[![Latest Stable Version](https://camo.githubusercontent.com/c8a283f748e243f8a4c9ca3fc5ff910bdb3b688416cef47ed2387c3a392a17bc/68747470733a2f2f706f7365722e707567782e6f72672f68687061636b2f70726f636573732f762f737461626c65)](https://packagist.org/packages/hhpack/process)[![CircleCI](https://camo.githubusercontent.com/fe3cd53546f8cf0bae59d40256553a4f93c955507be4d588e505ade530d194b0/68747470733a2f2f636972636c6563692e636f6d2f67682f68687061636b2f70726f636573732f747265652f6d61737465722e7376673f7374796c653d737667)](https://circleci.com/gh/hhpack/process/tree/master)[![Dependency Status](https://camo.githubusercontent.com/6a390959d3f8f6799dc1ea3fb3fa6d5d5ba6ba192bd5cede37c934bbba7ad91f/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3536323938653130333664306162303031363030313161322f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/56298e1036d0ab00160011a2)[![License](https://camo.githubusercontent.com/9fa2b041073b1bfdfa0a1a261b9a6b7e65370a8e226a08c6a9cfb8de3708d965/68747470733a2f2f706f7365722e707567782e6f72672f68687061636b2f70726f636573732f6c6963656e7365)](https://packagist.org/packages/hhpack/process)

Basic usage
-----------

[](#basic-usage)

Start the process, it is an example to wait until the end.
information of stdout and stderr are output to the buffer.

```
use HHPack\Process;

async function main() : Awaitable
{
  $result = await Process\exec('hh_client restart');
  $result->stdout()->display();
  $result->stderr()->display();

  $result = await Process\exec('hh_client check --json');
  $result->display();

  exit(0);
}
```

Execution of the script
-----------------------

[](#execution-of-the-script)

If you want to run the script, you can run in **execFile** function.

```
use HHPack\Process;

async function main() : Awaitable
{
  $result = await Process\execFile('/path/to/example.hh', [ 'a', 'b' ]);
  $result->stdout()->display();
  $result->stderr()->display();

  exit(0);
}
```

Manual control of the process
-----------------------------

[](#manual-control-of-the-process)

You can use the **spawn** function to generate a new child process.
To wait for the generated child process to finish use the **wait** method.

```
use HHPack\Process;
use HHPack\Process\ProcessOptions;

async function pipe_example() : Awaitable
{
  $options = new ProcessOptions();
  $options->stdout(new Stdout());
  $options->stderr(new Stderr());

  using ($p = Process\spawn('hh_client restart', [], $options)) {
    await $p->wait();
  }

  exit(0);
}
```

Run the test
------------

[](#run-the-test)

You can run the test with the following command.

```
composer install
composer test

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~79 days

Recently: every ~90 days

Total

17

Last Release

2591d ago

Major Versions

0.4.0 → 1.0.02017-02-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/70c299d6d6015ee714954aa05e4d0e9c7b1d31318a5d7db5e9bb4e1f70f78afc?d=identicon)[holyshared](/maintainers/holyshared)

---

Top Contributors

[![holyshared](https://avatars.githubusercontent.com/u/167190?v=4)](https://github.com/holyshared "holyshared (213 commits)")

---

Tags

child-processhacklanghhvmprocessutilityprocessSimplehackeasy

### Embed Badge

![Health badge](/badges/hhpack-process/health.svg)

```
[![Health](https://phpackages.com/badges/hhpack-process/health.svg)](https://phpackages.com/packages/hhpack-process)
```

###  Alternatives

[ashleydawson/simple-pagination

Simple, lightweight and universal service that implements pagination on collections of things

18161.2k2](/packages/ashleydawson-simple-pagination)

PHPackages © 2026

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